执行时:
path=os.path.dirname(__file__)+ /log.txt
log=open(path,"w",encoding= utf-8 )
我收到了:
log=open(path, w ,encoding= utf-8 )
File "C:Program FilesGooglegoogle_appenginegoogleappengine oolsdev_appserver.py", line 1203, in __init__
raise IOError( invalid mode: %s % mode)
IOError: invalid mode: w
我不敢肯定,为什么我可以写到档案中?