Run python script with CMD error

Peter Otten __peter__ at web.de
Mon Jan 27 14:52:31 EST 2014


raedtjr at gmail.com wrote:

> Hi everyone;
> 
> 
> Im new with python and i just installed it and added it to the path.I have
> already a script that i want to execute(run) but every time i do this
> commend python
> 
>> client.py
> 
> in CMD to execute it,i got this error. Any solutions please?
> 
>> File ", line 29 except Exception, e: ^ SyntaxError: invalid syntax

It is important for us to know the version of Python you are using. In 
Python 3 the above line has to be written

except Exception as e:

If the script was not written by you instead of fixing all the 
incompatibilities that may occur you should download and install Python 2.7 
and run the script with that.




More information about the Python-list mailing list