Donwloading files via replit terminal

Is it possible to create a file via python then download the file it created onto my device? All through replit and automatically. i dont want to have to manually export the file. Just have it download through python command

No , It Isn’t Because The Shell Doesn’t Have Access To Do That

1 Like

If you want to download a file from your Repl, try this:

  1. Open your shell
  2. Type these commands:
$ nix-env -iA nixpkgs.python3 # Installs python
$ python -m http.server

Now open the webpage that pops up and click on your file!
Just make sure the directory doesn’t have an index.html file or it may mess things up.
Hope this helps!

2 Likes