Python try block does not catch os.system exceptions
Python try block does not catch os.system exceptions Question: I have this python code: import os try: os.system(‘wrongcommand’) except: print(“command does not work”) The code prints: wrongcommand: command not found Instead of command does not work. Does anyone know why it’s not printing my error message? Asked By: Cinder || Source Answers: wrongcommand: command not …