Hi all, I'm trying to get the exit code of a program
I want to exec in a python script in a portable manner.
I've read that both os.system and os.spawnl are not a
portable solution.
I tried the os.popen() function and I got the program's exit
code with the close() method.
p=os.popen("ret urn_a_exit_code .sh")
retval=p.close( )
The only problem is that it doesn't return negative values.
What is your experience with that ?
Thanks in advance.
I want to exec in a python script in a portable manner.
I've read that both os.system and os.spawnl are not a
portable solution.
I tried the os.popen() function and I got the program's exit
code with the close() method.
p=os.popen("ret urn_a_exit_code .sh")
retval=p.close( )
The only problem is that it doesn't return negative values.
What is your experience with that ?
Thanks in advance.
Comment