Python's import: why doesn't it work?
Tim Peters
tim.one at comcast.net
Sun Sep 29 17:56:50 EDT 2002
[ Jurie Horneman]
> Actually, I just tried this in a DOS shell under Windows 98:
>
> python -v script.py >output.txt
>
> It lists the verbose output straight to the DOS shell, not to
> output.txt. The output is useless, I can't scroll back.
>
> Oddly,
>
> python -h >output.txt
>
> correctly sends the output to output.txt.
>
> Does anybody know if this is a bug,
Arguably so, but it's a command.com (the Win9x shell) limitation. Your
first example printed to stdout, your second to stderr, and command.com
simply doesn't allow redirecting stderr, or setting the DOS box history to a
usable value. cmd.exe (the WinNT/2K/XP shell) does both.
> and how I can work around it?
Programming life under command.com is impossible without tcap:
http://www.simtel.net/pub/pd/11141.html
It's free, tiny, and works great. It's the only Win9x "console capturing"
utility I've tried that actually works, and doesn't cause system
instability.
More information about the Python-list
mailing list