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

Type Pipe

object --+    
         |    
     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.
Method Summary
  __init__(self, cmd, bufsize, ignoreStderr)
    Inherited from Popen
  communicate(self, input)
Interact with process: Send data to stdin.
  poll(self)
Check if child process has terminated.
  wait(self)
Wait for child process to terminate.
  _close_fds(self, but)
  _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite)
Execute program (POSIX version)
  _get_handles(self, stdin, stdout, stderr)
Construct and return tupel with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
  _handle_exitstatus(self, sts)
  _set_cloexec_flag(self, fd)
  _translate_newlines(self, data)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Generated by Epydoc 2.1 on Mon Dec 18 22:53:30 2006 http://epydoc.sf.net