Mar-27-2017, 04:01 PM
Try "as" instead of a comma:
>>> try: cat ... except Exception, e: print(e) File "<stdin>", line 2 except Exception, e: print(e) ^ SyntaxError: invalid syntax >>> try: cat ... except Exception as e: print(e) ... name 'cat' is not defined