Python turtle online, with tkinter and pygame
A free online IDE that runs Python turtle, tkinter, pygame and Java Swing programs in their own windows, in the browser with nothing to install.
Published by Birdflop, a 501(c)(3) nonprofit · Last updated
CS Room runs Python turtle programs in the browser for free, and nothing is installed. tkinter, pygame and Java Swing programs work the same way.
Why turtle programs are hard to run online
Turtle draws in a window, and it needs the tkinter module and a screen to draw on. Most online compilers only show text, so the program stops with an error, often a TclError about a missing display. A desktop install fixes that, but plenty of schools can't install software on student computers. Trinket, which drew turtle programs in the browser, shut down on August 31, 2026.
What students get
- A Display tab beside the code, where turtle, tkinter, pygame and Swing windows open. Students click and type in them, and closing the tab closes the window.
- Sound from their programs, played through the browser.
- Turtle and tkinter ready as soon as they sign in. pygame takes one
pip install pygame, and it stays installed. - A terminal, for programs that ask for input.
Only the student sees their Display tab. To see a drawing, open their workspace and run the program there. 3D and OpenGL programs run slowly: there's no GPU, so they render in software.
Every student gets their own copy of your starter code, and due dates collect everyone's work. Tests grade what a program prints. For a drawing or a game, set Graded by to Manual on the assignment's Settings tab and enter points when you grade it.
Why does the turtle window close as soon as the drawing finishes?
The program ended. Put turtle.done() as the last line, and the window stays open until the student closes it.
Set up a class
- Sign up as a teacher and start building right away. Students can join once we review your account, usually within 1–2 days.
- Create a class, then turn on the class link and share it. Students sign in with Google or email and click Join class. They can't sign up without your class link or an email invite.
- Add starter code with New assignment. To install pygame for every student, put
build = "pip install -q pygame"in the assignment's .csroom file, and Run installs it before the program starts. - Students open a .py or .java file and click Run.