diff options
Diffstat (limited to 'sugar/session/Process.py')
-rw-r--r-- | sugar/session/Process.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sugar/session/Process.py b/sugar/session/Process.py new file mode 100644 index 0000000..09d93a7 --- /dev/null +++ b/sugar/session/Process.py @@ -0,0 +1,19 @@ +import logging + +import gobject + +class Process: + """Object representing one of the session processes""" + + def __init__(self, command): + self._command = command + + def get_name(self): + return self._command + + def start(self, standard_output=False): + args = self._command.split() + flags = gobject.SPAWN_SEARCH_PATH + result = gobject.spawn_async(args, flags=flags, + standard_output=standard_output) + self._stdout = result[2] |