Can't redirect output

Daniel Dittmar daniel at dittmar.net
Mon Feb 26 14:48:42 EST 2001


> I guess this is a known problem on NT? I have to work with NT, and
> I never found out exactly why it won't redirect. I found that if I create
> a .bat file that does nothing but call the .py file, I can redirect that
> just fine. Sounds like something evil going on under the covers.

There is a known Problem on NT that starting a program through it's
extension will make the redirection impossible.

So 'python hello.py > somefile.txt' should work. But 'hello.py >
somefile.txt' does not. Solutions: don't know, I'm using 4NT as a shell,
so I don't have this problem. Maybe auto-creating batch files for every
Python program is the simplest method.

Daniel



More information about the Python-list mailing list