I have this piece of code to create a .json file to store python data. When i run it in my server i get this error:
IOError: [Errno 13] Permission denied: 'juliodantas2015.json' at line with open(output_file, 'wb') as fp:
Python code:
fich_input='juliodantas2015.txt'
output_file= fich_input.strip('.txt')+'.json'
import json
with open(output_file, 'wb') as fp:
json.dump('yes', fp)
In command line i typed chmod 777 *.py but still not working. How can i fix this ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…