When to use it
Use these tutorials when you move code between Pyroom and another editor, keep a copy of your work, or write programs that read CSV data, text or images.
Python source files
Open Menu β File β Import file to load a .py or .txt file into the editor. Importing replaces the current code, so export first if you want to keep it. Export file downloads your program as a .py file you can open in any editor.
Data, images and resources
Open Menu β File β Resources β Add resources to add one or more files. Your code reads them from the resources/ folder:
with open("resources/scores.csv", encoding="utf-8") as file:
print(file.read())
Use Manage resources to see what is loaded and remove files you no longer need. Images can be used by turtle, tkinter and matplotlib programs.
Learning path
The Beginner tutorial imports a Python file and exports it again. The Intermediate tutorial adds a CSV file and an image as resources and reads them from code.
Good to know
Resources are inputs for the current session. They are not included in share links, so add them again after opening a share or starting a new session. To upload and run a complete Tkinter project with many files, use LaunchPad or Pro Mode.
Feature overview β