Code Pygame, Tkinter, and more in Your Browser!

The new Pygame trinket lets you make and share fully featured graphical programs in your browser

Did you know? We run a special virtual machine to display the images and produce the sounds you here, then stream them to your browser. This server runs a full version of Python 3, like our Python 3 trinket, but also supports graphics, sound, and interactivity.

Try out some of the example Python programs below to see what the Pygame Trinket can do. The Pygame trinket is available in our Premium Plans.

  • Turtle Teach with Code

  • 4 in a row

Want the power of Pygame?

Pygame is available in our premium Trinket Code+ and Trinket Connect plans, designed specifically for learners and educators.

Trinket's premium plans have a 30 day Satisfaction Guarantee.

Compare Plans