Hi as you can see here at
http://docs.python.org/tutorial/errors.html
in 8.3 handling exceptions theres a piece of code that works as you
want.
for example try this:
try:
int("a")
except Exception as e: #The key is using "as" and the variable name
you like for retrieving the exception because if you dont you will
only get
#"Exception type" type
print type(e) #This will give de exception type. In this case #<type
'exceptions.ValueError>'
print e #This will print you the message exception. #invalid
literal for int() with base 10: 'a'
print e.message #This would give you the string message #invalid
literal for int() with base 10: 'a'
I hope this can help you, please forgive me for my grammar im mexican.