Accessing local file system in Anaconda Code

I just started with Anaconda Code (Excel).
When I save a file to, let’s say, C:\test and read it back from C:\test everything works fine. But, I can’t find the file anywhere on my local drive.
So, two questions:

  • where is the file stored?
  • can I access the local file system in any way?

When you say “save a file”, you mean saving the Excel .xlsx file? Or are you doing something like np.save to save an array to disk?

Anaconda Code is running everything in a browser, so it doesn’t have access to your local hard drive.

I mean saving to a file from Python.
If I name the to be saved file X:\test it seems to be stored somewhere, but not on my local drive, which seems logical.
So where is it stored actually?

Where is it stored? In memory, until the page is reloaded.

Anaconda Code uses PyScript which runs in an embedded browser inside Excel. Everything in a browser is sandboxed, so it cannot access your local filesystem. Instead, it uses a Virtual Filesystem which is destroyed every time the page reloads.

See this excellent article for an in-depth discussion of virtual filesystem within PyScript.

1 Like