All guides

Online IDE for Python turtle, tkinter, pygame and Swing

A free online IDE that runs Python turtle, tkinter, pygame and Java Swing programs with real windows, in the browser with nothing to install.

CS Room is a free online coding classroom from a nonprofit. Every student gets their own workspace in the browser, with an editor, a Linux terminal and files that persist, and teachers get classes, autograding and a gradebook. It also runs programs that open windows: Python turtle, tkinter, pygame and Java Swing all work in the browser, with nothing to install.

Why GUI programs are hard to run online

A turtle or tkinter program needs a screen to draw on. Most online compilers only show text output, so the program stops with a TclError about a missing display. Desktop installs fix that, but not every school can install software on student computers, and Trinket, which drew turtle programs in the browser, has shut down.

How it works in CS Room

When a program opens a window, CS Room shows it in a pop-up window. Students click and type in it as they would on a desktop, and the drawing updates live. The window closes when the program ends, and closing the window stops the program.

  • Python turtle and tkinter work out of the box with Python 3.12.
  • pygame works after one pip install pygame, and stays installed in the student's workspace.
  • Java Swing runs on Java 25.
  • The same workspace runs Python, Java, C, C++, JavaScript, TypeScript, C# and Go, plus Jupyter notebooks.

Teaching with it

Turtle drawings make a good first week, tkinter suits a unit on events and interfaces, and pygame fits a games project. Everything else about running a class comes with it:

  • Hand out starter code, and every student gets their own copy.
  • Grade the text a program prints automatically, and score drawings and games by hand with an override in the gradebook.
  • Set due dates that collect everyone's work.
  • Open any student's workspace and edit alongside them when they're stuck.

Set up a class

  1. Request a teacher account. We set teachers up within a day or two.
  2. Create a class and share its class link. Students sign in and click Join class.
  3. Students open a .py or .java file and click Run. The program's window opens in a pop-up.
  4. End each turtle program with turtle.done(), or the window closes as soon as the drawing finishes.

See Writing assignment tests to autograde printed output.

Before you start

Allow pop-ups for csroom.org if the browser blocks the window. There's no GPU, so 3D and OpenGL programs render slowly in software.

Request a free teacher account to start a class.