Redirecting Error Information : Sys : Buildin Module PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Module » Sys »

 

Redirecting Error Information


import sys 

fsock = open('error.log', 'w')                
sys.stderr = fsock                                 
raise Exception, 'this error will be logged'



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Module
» Sys