Deliver geospatial models direct to decision makers with SyncroSim › Forums › ST-Sim & State-and-Transition Simulation Models › Bug Using Linux Tools? › Reply To: Bug Using Linux Tools?
August 1, 2016 at 11:58 am
#3981
alex.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