When starting a new repl, we create a "main" file for you so you can start coding quickly. However, if you want to split your project into multiple files, you can add new files from the files sidebar.
Then, you can import the module by referencing the name. Every language will have different syntax for doing this, so please consult the respective language documentation.
Here is an example in Python:
You can upload files by either dragging and dropping them into the files sidebar or by clicking the "three dot menu" and selecting upload file (or folder):
We support uploading any file type including images, video, and audio files, which will be displayed correctly in the browser. These files can also be programmatically generated.
For example, you can upload an image, alter it programmatically, and save the result to a new image. Like this (which you can try out here):
You can edit a file's name or delete it if you wish by clicking on the icon beside it. When renaming your file, make sure to use the correct file extension.
Two things to note about files:
Here's a few examples on files in different languages:
Programmatic file changes will get synced down to the repl automatically. In case of images we will display and update them for you on each change. This makes it really nice for plotting and data science work, which we cover in Python plots.