Package CedarBackup2 :: Module util :: Class Pipe
[hide private]
[frames] | no frames]

Class Pipe

source code

      object --+    
               |    
subprocess.Popen --+
                   |
                  Pipe

Specialized pipe class for use by executeCommand.

The executeCommand function needs a specialized way of interacting with a pipe. First, executeCommand only reads from the pipe, and never writes to it. Second, executeCommand needs a way to discard all output written to stderr, as a means of simulating the shell 2>/dev/null construct.

All of this functionality is provided (in Python 2.4 or later) by the subprocess.Popen class, so when that class is available, we'll use it. Otherwise, there's another implementation based on popen2.Popen4, which unfortunately only works on UNIX platforms.

Instance Methods [hide private]
 
__init__(self, cmd, bufsize=-1, ignoreStderr=True)
Create new Popen instance.
source code

Inherited from subprocess.Popen: communicate, poll, wait

Inherited from subprocess.Popen (private): _close_fds, _execute_child, _get_handles, _handle_exitstatus, _set_cloexec_flag, _translate_newlines

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, cmd, bufsize=-1, ignoreStderr=True)
(Constructor)

source code 
Create new Popen instance.
Overrides: subprocess.Popen.__init__
(inherited documentation)