H
Hari Sekhon
I'm running a command like
import commands
result = commands.getstatusoutput('somecommand')
print result[0]
3072
However, this exit code made no sense so I ran it manually from the
command line in bash on my linux server and it gives the exit code as
12, not this weird 3072 number.
So I tried os.system('somecommand') in the interactive python shell and
it too returned the same result for the exit code as the unix shell, 12,
but re-running the commands.getstatusoutput() with the exact same
command still gave 3072.
Is commands.getstatusoutput() broken or something?
-h
import commands
result = commands.getstatusoutput('somecommand')
print result[0]
3072
However, this exit code made no sense so I ran it manually from the
command line in bash on my linux server and it gives the exit code as
12, not this weird 3072 number.
So I tried os.system('somecommand') in the interactive python shell and
it too returned the same result for the exit code as the unix shell, 12,
but re-running the commands.getstatusoutput() with the exact same
command still gave 3072.
Is commands.getstatusoutput() broken or something?
-h