2006-07-12 17:21:22 +02:00
|
|
|
import logging
|
|
|
|
|
2006-07-12 14:02:29 +02:00
|
|
|
import gobject
|
|
|
|
|
|
|
|
class Process:
|
2006-07-12 17:21:22 +02:00
|
|
|
"""Object representing one of the session processes"""
|
|
|
|
|
2006-07-12 14:02:29 +02:00
|
|
|
def __init__(self, command):
|
|
|
|
self._command = command
|
|
|
|
|
|
|
|
def get_name(self):
|
|
|
|
return self._command
|
|
|
|
|
2006-07-12 22:24:49 +02:00
|
|
|
def start(self, standard_output=False):
|
2006-07-12 14:02:29 +02:00
|
|
|
args = self._command.split()
|
2006-07-12 22:17:57 +02:00
|
|
|
flags = gobject.SPAWN_SEARCH_PATH
|
2006-07-12 22:24:49 +02:00
|
|
|
result = gobject.spawn_async(args, flags=flags,
|
|
|
|
standard_output=standard_output)
|
|
|
|
self._stdout = result[2]
|