Here is the example code:
#python code
>>log=open('c:/log.txt','a') #open a file to log the message
>>print>>log,"This is log information" #then we put the log information to a file
>>log.close() # don't forget close the file
#python code
>>log=open('c:/log.txt','a') #open a file to log the message
>>print>>log,"This is log information" #then we put the log information to a file
>>log.close() # don't forget close the file
No comments:
Post a Comment