class to manage a extern sub process More...
Public Member Functions | |
def | __init__ (self, process, textMode=False) |
def | addArgument (self, arg) |
add a new argument | |
def | clearArguments (self) |
clear all arguments | |
def | start (self) |
start the new process | |
def | stop (self) |
Stop the process by sending SIGTERM and wait for ending. | |
def | readline (self) |
Read one line from stdout stream. | |
def | skipLines (self, lineCount=1) |
Skip given number of lines from the output. | |
def | skipLinesUntil (self, matchText) |
Skip lines from the output until the given string is in it. | |
def | setStdin (self, stdin) |
Set the stdin stream instance. | |
def | setStdout (self, stdout) |
Set the stdout stream instance. | |
def | setStderr (self, stderr) |
Set the stderr stream instance. | |
def | stdout (self) |
Property to get the stdout stream. | |
def | stderr (self) |
Property to get the stderr stream. | |
def | isRunning (self) |
Property to get process running state. | |
Protected Attributes | |
_args | |
_stdin | |
_stdout | |
_stderr | |
_processHandle | |
_textMode | |
class to manage a extern sub process
def boswatch.processManager.ProcessManager.__init__ | ( | self, | |
process, | |||
textMode = False |
|||
) |
def boswatch.processManager.ProcessManager.addArgument | ( | self, | |
arg | |||
) |
add a new argument
@param arg: argument to add as string
def boswatch.processManager.ProcessManager.clearArguments | ( | self | ) |
clear all arguments
def boswatch.processManager.ProcessManager.start | ( | self | ) |
start the new process
@return: True or False
def boswatch.processManager.ProcessManager.stop | ( | self | ) |
Stop the process by sending SIGTERM and wait for ending.
def boswatch.processManager.ProcessManager.readline | ( | self | ) |
Read one line from stdout stream.
@return singe line or None
def boswatch.processManager.ProcessManager.skipLines | ( | self, | |
lineCount = 1 |
|||
) |
Skip given number of lines from the output.
@param lineCount: number of lines to skip
def boswatch.processManager.ProcessManager.skipLinesUntil | ( | self, | |
matchText | |||
) |
Skip lines from the output until the given string is in it.
@param matchText: string to search for in output
def boswatch.processManager.ProcessManager.setStdin | ( | self, | |
stdin | |||
) |
Set the stdin stream instance.
def boswatch.processManager.ProcessManager.setStdout | ( | self, | |
stdout | |||
) |
Set the stdout stream instance.
def boswatch.processManager.ProcessManager.setStderr | ( | self, | |
stderr | |||
) |
Set the stderr stream instance.
def boswatch.processManager.ProcessManager.stdout | ( | self | ) |
Property to get the stdout stream.
def boswatch.processManager.ProcessManager.stderr | ( | self | ) |
Property to get the stderr stream.
def boswatch.processManager.ProcessManager.isRunning | ( | self | ) |
Property to get process running state.
@return True or False
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |