This file-like object is a wrapper around a command.
Members:
pid what is the PID of the subprocess?
killsig what signal killed the child process?
status what was the status of the command?
error if an error occurred, this describes it.
Methods:
close Close this process, killing it if necessary.
fileno Return the fileno used to read from the process.
wait Wait for the process to finish.
poll Is the process finished?
elapsed How much time has this process taken?
read
readline
readlines
Methods
|
|
|
|
__del__
|
__del__ ( self )
|
|
__init__
|
__init__ (
self,
pid,
cread,
errread=None,
)
_CommandHandle(pid, cread[, errread]) -> instance
Create a wrapper around a command. pid should be the process
ID of the command that was created, probably by a fork/exec.
cread should be a file object used to read from the child. If
errread is given, then I will look there for messages
pertaining to error conditions.
|
|
_cleanup_child
|
_cleanup_child ( self )
_cleanup_child() Do necessary cleanup functions after child is finished running.
|
|
close
|
close ( self )
close() Close the process, killing it if I must.
|
|
elapsed
|
elapsed ( self )
elapsed() -> num seconds How much time has elapsed since the process began?
|
|
fileno
|
fileno ( self )
fileno() -> file descriptor Return the file descriptor associated with the pipe.
|
|
poll
|
poll ( self )
poll() -> boolean Is the process finished running?
|
|
read
|
read ( self )
read() -> string Return the output as a string.
|
|
readline
|
readline ( self )
readline() -> string Return the next line read, or '' if finished.
|
|
readlines
|
readlines ( self )
readlines() -> list of strings Return the output as a list of strings.
|
|
wait
|
wait ( self )
wait() Wait until the process is finished.
|
|