Python's import: why doesn't it work?

Tim Peters at
Sun Sep 29 17:56:50 EDT 2002

[ Jurie Horneman]
> Actually, I just tried this in a DOS shell under Windows 98:
> python -v >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 (the Win9x shell) limitation.  Your
first example printed to stdout, your second to stderr, and
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 is impossible without tcap:

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

More information about the Python-list mailing list