os.system(r"ls") prints to screen??
Steve Holden
steve at holdenweb.com
Sat Sep 3 23:35:53 EDT 2005
Xah Lee wrote:
> does anyone know why the folllowing prints to the screen?
>
> # python
> import os
> os.system(r"ls")
>
> Xah
> xah at xahlee.org
> ∑ http://xahlee.org/
>
It only prints to the screen when standard output of the invoking
process is the screen. The sub-process forked by os.system inherits
stdin stdout and stderr from the invoking process.
This is all pretty basic stuff. Perhaps you should stop your verbal
assault on the computer science community and start to learn the
principles of what you are doing.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list
mailing list