Capture stderr/stdout from python embedded python?

Scott Bender sbender at harmony-ds.com
Tue Jun 6 12:40:08 EDT 2000


OK, I'm a loser. If I would have read the archives first, I would have seen
that I can reassign sys.stdout and sys.stderr.

thanks anyway,
- Scott

"Scott Bender" <sbender at harmony-ds.com> wrote in message
news:c_Q_4.1728$JC.3933905 at news.abs.net...
>
> Hi,
>
> I need to be able to capture/intercept any output by python in a program
> that embeds python. There is no stdout/stderr visiable to the user, so I
> need to present any messages in a window. Any easy way to do this? I have
no
> problem with modifying the python source. Can I just modify mywrite() in
> sysmodule.c? Or are there many other places I would need to do this?
>
> It seems to me that this would be a common problem for embeded python apps
> that run in a GUI environment. There should be a standard way to hook
this??
>
> thanks,
> - Scott
>
>
>





More information about the Python-list mailing list