Print Failure or success based on the value of the standalone tool
Ganesh Pal
ganesh1pal at gmail.com
Thu May 10 21:23:34 EDT 2018
On Thu, May 10, 2018, 22:31 Rob Gaddi
>
>
> By not using os.system, it's been superseded for reasons exactly like
> yours. https://docs.python.org/3/library/subprocess.html is your friend.
>
Can someone please help me understand this better for me with a program .
Will the returncode of subprocess still not be 0 or -ve number ?
My requirement is let the test_standalone_tool.py script which is a
wrapper around standalone_tool.py print pass /fail based on the possible
values I.e True , False and None
I'm not sure weather if I need to i.e replace os.system with subprocess or
make changes in standalone_tool.py to return 0 or -1( use sys.exit())
Regards,
Ganesh
More information about the Python-list
mailing list