Re: Print Failure or success based on the value of the standalone tool

2018-05-10 Thread Chris Angelico
On Fri, May 11, 2018 at 1:38 PM, Cameron Simpson wrote: > Returning to system() versus the subprocess module, there are other reasons > to prefer the subprocess module. The biggest is that os.system() runs a > shell command, a string passed to the programme /bin/sh. As such, that > string is subje

Re: Print Failure or success based on the value of the standalone tool

2018-05-10 Thread Cameron Simpson
On 11May2018 06:53, Ganesh Pal wrote: 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 .

Re: Print Failure or success based on the value of the standalone tool

2018-05-10 Thread Ganesh Pal
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 subproc

Re: Print Failure or success based on the value of the standalone tool

2018-05-10 Thread Rob Gaddi
On 05/10/2018 09:48 AM, Ganesh Pal wrote: I have to test a standalone tool from a python script and I am using os.system() to run the tool . I need to take decision based on the return value of the standalone tool . But since os.system merely throws the output value to STDOUT & returns the exit

Print Failure or success based on the value of the standalone tool

2018-05-10 Thread Ganesh Pal
I have to test a standalone tool from a python script and I am using os.system() to run the tool . I need to take decision based on the return value of the standalone tool . But since os.system merely throws the output value to STDOUT & returns the exit status (0 => no error) of the shell , how c