Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
C# QR Code Generator 4.0.2.2
Salesforce WordPress Customer Portal 3.2.0
Single Leg MLM 1.2.1
OzGIS 14.6
Quick Maps For Dynamics CRM 3.1
Job Board Software 4.2
PHP Real Estate Script 1.3.2
IP2Location Geolocation Database April.2019
dbForge Data Generator for Oracle 2.1
VisualNEO Web 2018.12.15
SentiMask SDK Trial 1.0.0
OrgChart JS 4.6.4
dotConnect for BigCommerce 1.8
FedEx Smart Shipping For Magento 1.0.0
Database Workbench Pro 5.6.2.311
Top Code
MATLAB Support Package for Arduino (aka ArduinoIO Package) 1.0
MLM Unilevel Plan Script 1.0.4
MLM Unilevel Plan Software 1.0.2
Job Board Software 4.2
AppControls 3.7.4
One Web MP3 Server Beta2
PHP AdminPanel - Control Panel Script 1.0.5
Comag Channel List Editor 1.0
Transparent Skin 1.00
Travel Booking script 1.0.4
Hangman Game 1.1
HTMLPad 2007 Pro 8.3
Tree data structure as a MATLAB class 1.0
Easynews PHP for Scripts 1.7.1
Bus Booking Script 1.0.4
Top Rated
VisualNEO Web 2018.12.15
Paste phpSoftPro 1.4.1
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
Context manager for low-level redirection of stdout/stderr 
File ID: 64477






Context manager for low-level redirection of stdout/stderr 
Download Context manager for low-level redirection of stdout/stderr http://code.activestate.com/recipes/577564-context-manager-for-low-level-redirection-of-stdou/?in=lang-pythonReport Error Link
License: Freeware
Downloads: 2
Submit Rating:
Context manager for low-level redirection of stdout/stderr  Description
Description: This context manager provides a convenient, Pythonic way to temporarily replace the file descriptors of stdout and stderr, redirecting to either os.devnull or files of your choosing. Swapping the C-level file descriptors is required when suppressing output from compiled extension modules, such as those built using F2PY. It functions equally well for pure-Python code. UPDATE: (see below).

License: Freeware

Related: contextmanager, context manager, f2py, Fortran, Python, Redirect, Stdout

O/S:Windows

Downloads: 2



More Similar Code

Context manager for a pid (process id) file used to tell whether a daemon process is still running.

On entry, it writes the pid of the current process to the path. On exit, it removes the file.

Designed to work with python-daemon.



A high-level interface for low-level physics engines such as ODE for use in games, robotics simulations, and other 3D applications. This C# port of OPAL includes intuitive objects such as Solids, Joints, Motors, Sensors and XML-based definitions.



Jamiba is a Java micro-benchmarking suite, designed for measuring the low-level performance of applications written in Java.



The Update Manager for Joomla! is one of the oldest update managers around having been originally released in January 2006 for Joomla! 1.0 and previously only available as part of the Advanced Tools package. The latest update manager is now...



Serial Wire Debug (SWD) Open Library for low level Debug Access Port (DAP) on new ARM Cortex CPU devices.



The C++ Data API is a very low-level implementation of simulating DataTypes and Data Structures through the use of templated classes. The goal of this project is to eventually build a minimal C++ compiler.



A context manager that handle a temporary change of the working directory



Often one wants to rebind a name or modify a mutable object, perform a bunch of actions and finally restore the name/object to its original state. An example is redirecting stdout/stderr temporarily...



Provides a context manager that allows the user to specify a method on the passed-in object to be called when the 'with' statement is exited. This is a generalization of contextlib.closing.



The following context manager causes any exceptions raised inside it to print a stack trace and exit immediately. The calling scope is not given a chance to catch the exception.

User Review for Context manager for low-level redirection of stdout/stderr
- required fields
     

Please enter text on the image