En Tue, 03 Nov 2009 10:06:24 -0300, Oltmans <rolf.oltm...@gmail.com> escribió:

Hi, all. All I'm trying to do is to print the error message using the
following code (copying/pasting from IDLE).

try:
    div(5,0)
except Exception as msg:
    print msg

SyntaxError: invalid syntax

I'm using Python 2.5 on Windows XP.

Other people already told you what the problem is.
I suggest reading a book/tutorial written for the *same* Python version you're using (2.x; it doesn't matter 2.6, 2.5, 2.4...). Once you know the basics of the language, you may look at the differences in the "What's new?" document for Python 3.0 - but right now, they will just confuse you.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to