Module subprocess :: Class Popen
[show private | hide private]
[frames | no frames]

Type Popen

object --+
         |
        Popen

Known Subclasses:
Pipe

Method Summary
  __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags)
Create new Popen instance.
  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)

Method Details

__init__(self, args, bufsize=0, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=False, shell=False, cwd=None, env=None, universal_newlines=False, startupinfo=None, creationflags=0)
(Constructor)

Create new Popen instance.
Overrides:
__builtin__.object.__init__

communicate(self, input=None)

Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional input argument should be a string to be sent to the child process, or None, if no data should be sent to the child.

communicate() returns a tuple (stdout, stderr).

poll(self)

Check if child process has terminated. Returns returncode attribute.

wait(self)

Wait for child process to terminate. Returns returncode attribute.

_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

Generated by Epydoc 2.1 on Thu Mar 29 20:58:27 2007 http://epydoc.sf.net