0

I am changing folder and running a program. The code works but I would like to capture the response from the command line to be sure the execution of the program was successful.

import os
print(os.getcwd())
os.chdir('C:/Program Files/ABX/App/')
print(os.getcwd())
command = 'abx.exe'
response = os.system(command)

Response gives me an integer of 1. How can I catch the response of command line after executing os.system(command)

Patrick Artner
  • 50,409
  • 9
  • 43
  • 69
Jonathan Lam
  • 1,237
  • 3
  • 20
  • 49

0 Answers0