Reply To: Bug Using Linux Tools?

#3981
alex.embreyalex.embrey
Participant

Hi Taylor,

My understanding is that the return value for os.system is OS dependent. On Linux I believe the value is the return code combined with the signal used by the system to end the process. This probably accounts for what you are seeing. To avoid these types of issues, the Python docs recommend you use the subprocess library instead of os.system:

https://docs.python.org/3/library/os.html#os.system
https://docs.python.org/3/library/subprocess.html#subprocess-replacements

Regards,

-Alex