Package ClusterShell :: Package Worker :: Module fastsubprocess :: Class Popen
[hide private]
[frames] | no frames]

Class Popen

source code


A faster Popen

Instance Methods [hide private]
 
__init__(self, args, bufsize=0, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, shell=False, cwd=None, env=None, universal_newlines=False)
Create new Popen instance.
source code
 
_translate_newlines(self, data) source code
 
__del__(self, sys=<module 'sys' (built-in)>) source code
 
communicate(self, input=None)
Interact with process: Send data to stdin.
source code
 
poll(self) source code
 
_get_handles(self, stdin, stdout, stderr)
Construct and return tupel with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
source code
 
_execute_child(self, args, executable, preexec_fn, cwd, env, universal_newlines, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite)
Execute program (POSIX version)
source code
 
_handle_exitstatus(self, sts) source code
 
_internal_poll(self, _deadstate=None)
Check if child process has terminated.
source code
 
wait(self)
Wait for child process to terminate.
source code
 
_communicate(self, input) source code
 
send_signal(self, sig)
Send a signal to the process
source code
 
terminate(self)
Terminate the process with SIGTERM
source code
 
kill(self)
Kill the process with SIGKILL
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

source code 

Create new Popen instance.

Overrides: object.__init__

communicate(self, input=None)

source code 

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).

_internal_poll(self, _deadstate=None)

source code 

Check if child process has terminated. Returns returncode attribute.

wait(self)

source code 

Wait for child process to terminate. Returns returncode attribute.