Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/Process.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-07-12 12:02:29 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-07-12 12:02:29 (GMT)
commitbe806eb1918f7db90e661b5fcb4e260a0b1ba669 (patch)
tree09ca8d2341d5875c1623801516a5f32bf1626063 /shell/Process.py
parentca2b08f8b6fb1bc54a4e4f9cfc457f57cf958c7f (diff)
More cleanups and some fixes
Diffstat (limited to 'shell/Process.py')
-rw-r--r--shell/Process.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/shell/Process.py b/shell/Process.py
new file mode 100644
index 0000000..fcbf779
--- /dev/null
+++ b/shell/Process.py
@@ -0,0 +1,16 @@
+import gobject
+
+class Process:
+ def __init__(self, command):
+ self._pid = None
+ self._command = command
+
+ def get_name(self):
+ return self._command
+
+ def start(self):
+ args = self._command.split()
+ flags = gobject.SPAWN_SEARCH_PATH or gobject.SPAWN_STDERR_TO_DEV_NULL
+ result = gobject.spawn_async(args, flags=flags, standard_output=True)
+ self._pid = result[0]
+ self._stdout = result[2]