I a have flask based web service where I trying to download the results to a file to user's desktop (via https).
I tried :
def write_results_to_file(results):
with open('output', 'w') as f:
f.write('\t'.join(results[1:]) + '\n')
this method gets activated when I click export button in the ui.
But I am getting :
<type 'exceptions.IOError'>: [Errno 13] Permission denied: 'output'
args = (13, 'Permission denied')
errno = 13
filename = 'output'
message = ''
strerror = 'Permission denied'
Can some one tell me what I am doing wrong here ?