Inserting-embedding some html data at the end of a .py file

Νίκος Γκρ33κ nikos.gr33k at gmail.com
Thu Mar 7 04:05:45 EST 2013


Τη Πέμπτη, 7 Μαρτίου 2013 10:58:13 π.μ. UTC+2, ο χρήστης Roland Koebler έγραψε:
> Hi,
> 
> 
> 
> > but now iam receiving this error concering except:
> 
> > 
> 
> > nikos at superhost.gr [~/www/cgi-bin]# /usr/bin/python3 metrites.py 
> 
> >   File "metrites.py", line 88
> 
> >     except MySQLdb.Error, e:
> 
> >                         ^
> 
> > SyntaxError: invalid syntax
> 
> > nikos at superhost.gr [~/www/cgi-bin]# 
> 
> > 
> 
> > which used to work ok in v2.6.6
> 
> > 
> 
> > can you help?
> 
> Python 3 introduced some Python 2-incompatible changes.
> 
> So, please read: http://docs.python.org/release/3.0.1/whatsnew/3.0.html
> 
> 
> 
> Roland

I did read about print but i'm interesetd to see and its not mentioned there how

	except MySQLdb.Error, e:
		print ( "Query Error: ", sys.exc_info()[1].excepinfo()[2] )

is supposed to be written as in Python v3.x



More information about the Python-list mailing list