try: xxxxxx except Exception as e: # print(e) print(type(e)) # output: print(e.__class__.__name__) # output:ProgrammingError 请问在这种情景下,如何能获得'MySQLdb.ProgrammingError'完整的字符串? print, MySQLdb, Exception, output