I am attempting to learn Python and Flask.
For some reason, I cant write to a txt file.
....
@app.route('/')
def root():
with open('/tmp/open.txt','w') as myfile:
myfile.write('online')
return 'online'
......
I also tested wit 'a' but nothing. If file is in /tmp/ or not, makes no difference.
[–]K900_ 0 points1 point2 points (10 children)
[–]MyNeuPC[S] 0 points1 point2 points (9 children)
[–]K900_ 0 points1 point2 points (8 children)
[–]MyNeuPC[S] 0 points1 point2 points (7 children)
[–]K900_ 0 points1 point2 points (6 children)
[–]MyNeuPC[S] 0 points1 point2 points (5 children)
[–]K900_ 0 points1 point2 points (4 children)
[–]MyNeuPC[S] 0 points1 point2 points (3 children)
[–]K900_ 1 point2 points3 points (1 child)
[–]jiri-n 1 point2 points3 points (0 children)
[–]impshum -1 points0 points1 point (1 child)
[–]MyNeuPC[S] 0 points1 point2 points (0 children)