Package trac :: Package util :: Class NaivePopen

Class NaivePopen

source code

object --+
         |
        NaivePopen

This is a deadlock-safe version of popen that returns an object with errorlevel, out (a string) and err (a string).

The optional input, which must be a str object, is first written to a temporary file from which the process will read.

(capturestderr may not work under Windows 9x.)

Example:

print(Popen3('grep spam','\n\nhere spam\n\n').out)
Instance Methods
 
__init__(self, command, input=None, capturestderr=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, command, input=None, capturestderr=None)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)