IOstreams/pipes, newbie question, capturing console info form another script?

G. Willoughby sab at NOSPAM.freeuk.com
Sat Mar 23 11:15:30 EST 2002


Hi,
    I'm a bit of a newbie when it comes to streams and such so has anybody
any help with this? i have a Tkinter program that when run and you click a
certain button it calls an 'os.system()' command which starts up another
non-gui python script thus:
 [snip]
 os.system("python mapper.py -settings mappergui.ini -scale %s -out
latest_render.jpg -zone %s" % (self.imageSize, self.currentZone))
 [/snip]
 now i was wondering because this 'mapper.py' script and an included
'zone.py' writes alot of info to the console using 'sys.stdout.write()' can
i intercept this using my first Tkinter prgram so i can display this info in
another freshly created window. basically i am writing a gui for a cmdline
script! if so has anyone got any examples of code for me to look at that
would be great!

 Thanks

 G. Willoughby





More information about the Python-list mailing list