PySimpleGui to make Awesome GUi with Python… and easily!

Ok, let’s explore this python module to make graphic user interfases to interact with users. This is so good and simple. You know I love tkinter and I always used it, but let’s see what this module has to offer to use. First of all, let’s install it.

pip install pysimplegui

It’s very fast to install and lightweight.

Let’s see the first example from their documentation.

Look at this cute window

So:

  • you choose a theme
  • define a list of widgets:
    • a text in the first row
    • a text and an InputText in the second
    • 2 buttons in the third

Then you create the window, giving the title and assigning the layout (the list of widgets)

Then you need to create your loop to make the window ‘active’.

The user event are read with window.read() (where window is the istance of Window class defined before).

If you type something into the InputText it will be memorized into values[0] apparently.

See you in the next post for other discoveries about this module that seems nice.

GUI to make the pc talk with gtts (google text-to-speech API)

This is from the repository of pysimplegui. I made some script like this, but with tkinter. So let’s see this interesting app to use the google text-to-speech api to convert text to mp3. In this case the author of the code used pygame to make the speech audible.

Subscribe to the newsletter for updates
Post written by Avatar A python enthusiast


My youtube channel
Twitter: @pythonprogrammi - python_pygame

Higlighted videos

Speech recognition game
Pygame cheatsheets Videos about this map editor
New free game: Crystal of time
How to make a map editor 1
How to make a map editor 2
How to make a map editor 3
Map editor 1.5
Map editor 1.6
How to make a videogame map editor with Python - MEP v. 2.1
Map editor for 2d platform game in Python with Pygame v.3.0
How to save a list with pickle with python
Pygame Map Editor 4.0 for Crystals of time
Github repository
Newest branch (to clone it with git)
git clone --branch cotb2 https://github.com/formazione/timecrystals.git

Published by pythonprogramming

Started with basic on the spectrum, loved javascript in the 90ies and python in the 2000, now I am back with python, still making some javascript stuff when needed.