continuous redirection of stdout & stderr to Tkinter Text

Phlip phlip_cpp at my-deja.com
Wed Jun 26 20:16:48 EDT 2002


"Fabien Hénon" wrote:

> I am using Tkinter as an editor and a launcher (under Linux) for a
> raytracer (POV-RAY)
>
> Once started, the raytracer does two things in the same time :
> - it displays the image being raytraced
> - it spits out information to the console (ie : the line which is being
> raytraced).
> I get the image displayed but not the redirection of stdout

Hit this. It's short:

    http://flea.sourceforge.net/browser006.zip

    http://www.c2.com/cgi/wiki?PyUnitTestBrowser

It contains a class called Piper that wraps up all the crap require to pipe
in one reusable package.

Alternately, use os.system and let the stdout and stderr spew out on the
console.

--
  Phlip





More information about the Python-list mailing list