A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/070051.html below:

(no subject)

(no subject) (no subject)ed_tsang at yahoo.com ed_tsang at yahoo.com
Mon Apr 30 12:47:23 EDT 2001
 I am trying to print the traceback infor using the floowing code. I 
get the traceback info form call traceback.print_exception. the file 
that I want o print to is trcfile whihc has value of error.txt. 
How can I do that?? thanks


 trcfile = "error.txt"
 try:
     
    execCmd = "guiCb.pixitObj.%s"%eventHandler[0]
    exec(execCmd)
 except:
                         
    printwrite(trcfile, "Ctf Error   : Error executing eventhandler %
s \nTraceback detail follows:\n"%eventHandler[0], "FAIL")
    exc = sys.exc_info()
                        
    try:
        traceback.print_exception(exc[0],exc[1],exc[2],file = trcfile)
    finally:
        pass
    print "Test case fail exception raised\n"
    raise TestCaseFail



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4