rocket_launchStart coding
Pyroom runs Python directly in your browser. You do not need an account or a Python installation.
- Open the Playground.
- Write Python in the editor, or load an existing file.
- Select Run (or press F5) and read output in the console.
schoolUse Teacher Mode
Teacher Mode adds a task panel so learners can see instructions beside their starter code.
- Open the Playground menu, choose More, then select Switch to Teacher Mode.
- In the Task panel, add a task name and describe the work. The description supports formatted text and Markdown.
- Prepare the code learners should start with, then use sharing to distribute it.
Lock a task
Use the task state button or Task settings to lock the task. You can set a PIN to require a password before editing, and enable Auto-lock when sharing.
Important: a shared task PIN is kept only on the device where it was created. A protected task opened elsewhere is view-only and cannot be unlocked there. Task locking protects task instructions, not secret solutions: shared Python code is visible to learners. Share starter code, not answer keys.
extensionLoad Python libraries
The Python standard library is available immediately. For packages such as numpy, pandas, and matplotlib, open Menu → Settings → Library settings.
- Enter a package name, for example
pandas. - Select Load library.
- Import and use it in your code.
import pandas as pd
print(pd.DataFrame({"score": [8, 10, 9]}))
When a program imports a supported package that is not ready yet, Pyroom can also ask to load it. A library loaded while online is cached for later offline use.
Good to know: the initial download requires internet. Not every PyPI package works in a browser—packages that rely on native binaries, processes, threads, sockets, or a real filesystem may be unavailable. See the
available packages list.
shareShare code and tasks
Open Menu → Share → Open Share dialog. Add a task name and author if helpful, then choose the sharing method that fits your situation.
| When to use it | Choose | What learners receive |
|---|
| Small program or no internet | Offline (QR) | A full link or QR code; no server storage is used. |
| Classroom links or longer programs | Online | A short link, 8-character code, QR code, and a ready-to-send message. |
| Website or LMS embed | Share as iframe | Embed code with configurable interface options. |
Offline sharing
Copy the full link or generate a QR code. It works without a sharing server, but a large program may not fit in a QR code; use the link instead.
Online sharing
Choose how long the link should remain available, then create the share. Learners can open the short link or select Menu → Share → Enter share code and type its 8-character code.
Before opening a share: Pyroom asks for confirmation because it replaces your current code. Export important work first. Share links include code and task information, but not uploaded resource files or downloaded library caches.
folder_openLoad and save files
Python source files
Open Menu → Import / Export → Import file to load a .py or .txt file. Importing replaces the editor content. Choose Export file to download your current code as a .py file.
Data, images, and resources
Open Menu → Resources → Add files or Manage resources. Add one or more files, then read them from Python under resources/.
with open("resources/my_file.txt", encoding="utf-8") as file:
print(file.read())
Resources are session inputs. They are not a complete project filesystem and are not included in a shared link, so add them again after opening a new session or share. To upload and run a complete Tkinter project, use
LaunchPad.
bug_reportDebug Python step by step
- Enable the debugger with the bug icon in the desktop toolbar. On mobile, open Menu → Debug → Enable Debugger.
- Set a breakpoint by clicking a desktop line number or gutter. On mobile, tap the line number/gutter, or long-press a line while debugging is enabled.
- Run the program. It pauses when it reaches the breakpoint.
- Inspect the highlighted line and the Variables panel. Use Code for variables assigned in your code, or All for all visible values.
- Select Step Over to execute the next operation, or Continue to run until the next breakpoint or the end.
total = 0
for number in [2, 4, 6]:
total += number # Set a breakpoint here
print(total)
Breakpoints are temporary for the current editor session. The debugger provides Step Over, not step-into or a full call-stack view. For syntax errors or a crash before a breakpoint, read the console traceback first.
smart_toyExplain an error with AI Assistant
AI Assistant is an experimental, browser-based helper that explains failed Python runs in plain language.
- Run your program.
- When it fails or crashes, select AI Assistant in the console area.
- Read what happened, why it happened, and the suggested next change.
- Update your code and run it again.
If the button is not visible, open Menu → Settings → UI & Plugins, enable AI Assistant, and run the code again.
Experimental feature: the first use may need internet to load its browser-based model; once cached, it can work offline in supported situations. Speed and availability depend on browser and device memory. It needs no API key, but its suggestions are learning help—not automatic fixes—so always review and rerun your code.