import sysdef excFunc() : raise ValueErrortry: excFunc()except: print "Got an exception" print sys.exc_info()