How do I catch output to stdout/stderr when launching from a launcher?

I added this to /usr/lib/gedit-2/plugins/externaltools/__init__.py:

import sys
f = open('/tmp/eraseme.txt', 'w')
print >> f, "The executable is %r." % sys.executable
f.close()

In both cases (launcher/termial) the contents of eraseme.txt are:
The executable is '/usr/bin/python'.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to