A.M wrote:
> Is there anyway I can get the exit code (what os.system returns) from
> os.popen?
you'd rather kill yourself than read the documentation, right?
http://www.python.org/doc/lib/os-newstreams.html#os-newstreams
"The exit status of the command (encoded in the format specifie
> Try:
>
> s = os.popen("DIR").read()
>
Thanks Steve.
Is there anyway I can get the exit code (what os.system returns) from
os.popen?
--
http://mail.python.org/mailman/listinfo/python-list
A.M wrote:
> Hi,
>
>
>
> How can I run an OS command and have the command's output (to stdout) in my
> string variable?
>
>
>
> For example in windows, this command should return a list of files within
> directory:
>
>
>
> os.system("DIR")
>
>
>
> I am looking for an alternative funct
Hi,
How can I run an OS command and have the command's output (to stdout) in my
string variable?
For example in windows, this command should return a list of files within
directory:
os.system("DIR")
I am looking for an alternative function that returns the DIR command output
in a str