Python文件读取

f = open(path, 'w')
f.write(self.str)
f.close()

IOError: [Errno 13] Permission denied: 'output.txt'

没有权限写文件,比较蠢的解决方法

sudo chmod 777 <file_name>

posted on 2016-12-13 15:04  LebronZhang  阅读(93)  评论(0编辑  收藏  举报

导航