cross platform (linux/windows) problem

Miah Gregory miah at picsel.com
Mon Mar 4 06:43:34 EST 2002


In message <a5jheh$ceb$1 at peabody.colorado.edu>
          Fernando Pérez <fperez528 at yahoo.com> wrote:

> See if the following code helps. It does all the trapping of stdout/stderr
> in a class, and you can then decide what to do with it. It doesn't address
> the calling part of your problem, only the output part.

-snip code-

I tried a simple test of your code, not directly, but by hand, and although
stdout /seemed/ to get trapped, it seemed to go to oblivion. stderr didn't
work at all.

I should note at this juncture that I'm working with python 1.5.2 from
debian stable. The popen tactic works fine under windows now, as that's
running python 2.0. Unfortunately, though, I can't upgrade my linux machine,
as too much other stuff depends on this version of debian.

Thanks for your reply, though.. I'll have another play around with it and see
if I can persuade it to work.

-- 
Miah Gregory



More information about the Python-list mailing list