Pyroom Playground guide

How to use Pyroom

Run Python in the browser, prepare classroom tasks, load files and libraries, share work, and find errors with the debugger or AI Assistant.

Open Playground

Start coding

Pyroom runs Python directly in your browser. You do not need an account or a Python installation.

  1. Open the Playground.
  2. Write Python in the editor, or load an existing file.
  3. Select Run (or press F5) and read output in the console.

Use Teacher Mode

Teacher Mode adds a task panel so learners can see instructions beside their starter code.

  1. Open the Playground menu, choose More, then select Switch to Teacher Mode.
  2. In the Task panel, add a task name and describe the work. The description supports formatted text and Markdown.
  3. 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.

Load Python libraries

The Python standard library is available immediately. For packages such as numpy, pandas, and matplotlib, open Menu → SettingsLibrary settings.

  1. Enter a package name, for example pandas.
  2. Select Load library.
  3. 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.

Share code and tasks

Open Menu → ShareOpen Share dialog. Add a task name and author if helpful, then choose the sharing method that fits your situation.

When to use itChooseWhat learners receive
Small program or no internetOffline (QR)A full link or QR code; no server storage is used.
Classroom links or longer programsOnlineA short link, 8-character code, QR code, and a ready-to-send message.
Website or LMS embedShare as iframeEmbed 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.

Load and save files

Python source files

Open Menu → Import / ExportImport 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 → ResourcesAdd 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.

Debug Python step by step

  1. Enable the debugger with the bug icon in the desktop toolbar. On mobile, open Menu → DebugEnable Debugger.
  2. 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.
  3. Run the program. It pauses when it reaches the breakpoint.
  4. Inspect the highlighted line and the Variables panel. Use Code for variables assigned in your code, or All for all visible values.
  5. 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.

Explain an error with AI Assistant

AI Assistant is an experimental, browser-based helper that explains failed Python runs in plain language.

  1. Run your program.
  2. When it fails or crashes, select AI Assistant in the console area.
  3. Read what happened, why it happened, and the suggested next change.
  4. Update your code and run it again.

If the button is not visible, open Menu → SettingsUI & 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.