If program creates a file where is it stored on the local machine

I have below python code.
it creates a file for writing. Where is this file getting store on the local machine when I run the program

Repl link:

wb = xlsxwriter.Workbook('hello.xlsx')
ws = wb.add_worksheet()
ws.write('A1', 'Hello world')

A file created through code or in any other way in your repl is saved not on your local machine, but in your cloud repl. Any changes to your repl will not affect your local machine in any way. To download files from your repl to your local machine, you can click on the button near the file name and select Download (only one file will be downloaded), or click on the button at the top of the file panel and select Download as zip (downloads all files of your repl).


When a program is run, the directory which the file executed is located in becomes the current working directory, so by default, any files created will be within this directory. You can of course change the current working directory using os.chdir or you can specify a subfolder /some subfolder/file.smthn.

1 Like

OK. Thanks for the help.

I ran code from the shell. And then downloaded the file to local machine

~/Python$ python worksheet.py
program finished


1 Like

You can mark the message that helped you the most as a solution. So that people with the same problem can solve it quickly.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.