Web Analytics Made Easy - Statcounter
Skip to content

Welcome to the PySimpleGUI Interactive eCookbook

SOME of these Trinkets are older, but all work.

Use the navigation bar on the left to look through the pages. Each page has at least one demo program for you to RUN in your browser.

With this eCookbook you don't need to do anything than click run. That's it. You can see the code that's running, modify it, and if you find it particulrly useful, copy it to your machine and use it in your project.

Example - The Basic PySimpleGUI Program

Let's start with the most basic of PySimpleGUI programs so you know how they work.

The code is on the left. Clicking run will show the GUI on the right side. The print output (stdout, stderr) are down in a window below the GUI. There are more controls, but that's enough to get you running. So, go ahead, click RUN!

The Demo Programs

There are over 300 .py .pyw files on the PySimpleGUI Repo that you can consider to be Cookbook Recipes. They show you how PySimpleGUI works and how to integrate PySimpleGUI with other packages. Ready to run bookbook recipes that are simple enough and commented enough that you don't need text.


The Full Documenation

The Cookbook, primary doc, readme, call reference, etc, can always be found here:


Known (slight) Problems

Missing Titlebars

Special code was added to PySimpleGUI to use a custom Titlebar when the program is running on Trinket. Not all Trinkets have this code added to them.

You will notice with older versions of PySimpleGUI and Trinket that there is no titlebar on the window. That is because the titlebar is provided by the Operating System and Trinket doesn't really have one and thus the need for PySimpleGUI's custom code.

Smaller Screen Real Estate

800 x 600 is the size of a standard Trinket screen that PySimpleGUI has to work with.

That's quite small when you're trying to run Demo Programs from the PySimpleGUI project. Some won't fit. Most will though.

You may need to use the full-screen mode for some examples. Information about full-screen is on this page in one of the first examples.

Consider Supporting Trinket

Trinket is a fantastic platform for teaching PySimpleGUI. It's easy for students to use. It's easy for teachers to use. It doesn't require anyone to install anything anywhere. All that's needed is a browser. Coding from a tablet is difficult unless you have a keyboard, that's true for every coding site on the internet.

I consider Trinket to be a partner. They've provided solid service to the PySimpleGUI community for several years. "It just works" is one of the most valuable traits for a product or service and PySimpleGUI "just works" on Trinket. Make a new PyGrame Trinket project, type import PySimpleGUI as sg, and you're ready to start having fun!

The prices are riduculously low what we're all getting to experience - PySimpleGUI running in the browser with zero effort on your part.

Get on with learning!

Start clicking topics on the left table of contents and have fun while learning PySimpleGUI.....