I have this python code:
import os try: os.system(\'wrongcommand\') except: print(\"command does not work\")
The code prints:
wrongcommand: command not found is the output of the shell os.system is using to invoke the command. os.system did not throw an exception
wrongcommand: command not found
os.system
EDIT: edited by copy-and-pasting part of mgilson's comment