Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
authorChris Ball <cjb@pullcord.laptop.org>2007-08-20 22:58:52 (GMT)
committer Chris Ball <cjb@pullcord.laptop.org>2007-08-20 23:00:26 (GMT)
commit1bb3a0f7cc86a6ee693486dcf566f146ffb307f0 (patch)
tree4f93e8883e6d3fd26de7c3d463b08ac5b287fa4d /activity.py
parent6b15263783440523b0f1be3ac917134428945a37 (diff)
Focus the output area by default, workaround a VTE problem
In particular, VTE seems to be freezing the terminal when Python processes exit *before* flushing their output buffers to the terminal. Adding a sleep ameliorates it, but we need a real fix.
Diffstat (limited to 'activity.py')
-rw-r--r--activity.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/activity.py b/activity.py
index 54a4544..914dc4b 100644
--- a/activity.py
+++ b/activity.py
@@ -199,7 +199,7 @@ class PippyActivity(Activity):
self.text_buffer.set_text("".join(lines))
def gobutton_cb(self, button):
- #self._vte.reset(True, True)
+ self._vte.grab_focus()
self._vte.feed("\x1B[H\x1B[J")
# FIXME: We're losing an odd race here
@@ -213,7 +213,7 @@ class PippyActivity(Activity):
file.write(line)
file.close()
- pid = self._vte.fork_command(sys.executable, ["python", "/tmp/pippy.py"])
+ pid = self._vte.fork_command("/bin/sh", ["/bin/sh", "-c", "python /tmp/pippy.py; sleep 1"])
def _shared_cb(self, activity):
self._logger.debug('My activity was shared')