How to call an external program in python and retrieve the output and return code? How to call an external program in python and retrieve the output and return code? python python