commands.getstatusoutput on NT
Lee, Jaeho
Jhlee at Brooks.com
Wed May 24 17:28:33 EDT 2000
I want to use commands.getstatusoutput on NT. I have some python script
works on Unix and I want to port it to NT. Except getstatusoutput,
everything is working fine. I made a simple test script.
import commands
r = commands.getstatusoutput("dir")
for s in r:
print s
But r has the following error message.
1
The name specified is not recognized as an
internal or external command, operable program or batch file.
What did I do wrong? On Unix, commands.getstatusoutput("ls") works fine. If
there is any other method that does same job on NT, I can change my script.
What I want to do is run shell command and get the result.
Thanks in advance,
Jaeho
More information about the Python-list
mailing list