Python sys.excepthook丢失,sys.stderr丢失
下面是一段代码Python sys.excepthook丢失,sys.stderr丢失,python,exception,exception-handling,stderr,ioerror,Python,Exception,Exception Handling,Stderr,Ioerror,下面是一段代码 def do_scheme(): print """ <scheme> <title>ABC</title> <description>ABC is Company</description> """ if __name__ == "__main__": do_scheme() 我试图处理sys.excepthook,但没有成
def do_scheme():
print """
<scheme>
<title>ABC</title>
<description>ABC is Company</description>
"""
if __name__ == "__main__":
do_scheme()
我试图处理sys.excepthook,但没有成功。这里有没有什么装饰程序可以用来避免这样的错误消息
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr