Web Analytics Made Easy - Statcounter
Skip to content

The PySimpleGUI Ports - tk, Qt, Wx, Remi/Web

You've already learned that PySimpleGUI runs on multiple operating systems (Windows, Linux, Mac). The architecture of PySimpleGUI was designed to be portable not just across operating systems, but across GUI frameworks.

Each PySimpleGUI port has a detailed call reference. You'll find all 4 of them on the call reference page tab in the documentation: Call Reference

You can directly access each port's call reference using these links:

Call Reference PySimpleGUI (tkinter)

Call Reference PySimpleGUIQt

Call Reference PySimpleGUIWx

Call Reference PySimpleGUIWeb

Framework Portability

What does it mean to be portable across GUI frameworks? Well, just like moving from Windows to Linux to Mac requires no changes to your PySimpleGUI code, moving from one GUI framework to another also requires no changes to your PySimpleGUI code.

PySimpleGUI runs on these 4 GUI frameworks:

  1. tkinter
  2. Qt (PySide2 and PySide6)
  3. WxPython
  4. Remi (Web based)

Let's looks at an example so you can grasp the concept more easily. This PySimpleGUI program has 4 imports. Only 1 import at a time should be uncommented.

import PySimpleGUI as sg
# import PySimpleGUIWeb as sg
# import PySimpleGUIWx as sg
# import PySimpleGUIQt as sg


layout = [[sg.Text('Send an Email', font='Default 18')],
          [sg.Text('From:', size=(8,1)), sg.Input(key='-EMAIL FROM-', size=(35,1))],
          [sg.Text('To:', size=(8,1)), sg.Input(key='-EMAIL TO-', size=(35,1))],
          [sg.Text('Subject:', size=(8,1)), sg.Input(key='-EMAIL SUBJECT-', size=(35,1))],
          [sg.Text('Mail login information', font='Default 18')],
          [sg.Text('User:', size=(8,1)), sg.Input(key='-USER-', size=(35,1))],
          [sg.Text('Password:', size=(8,1)), sg.Input(password_char='*', key='-PASSWORD-', size=(35,1))],
          [sg.Multiline('Type your message here', size=(60,10), key='-EMAIL TEXT-')],
          [sg.Button('Send'), sg.Button('Exit')]]

window = sg.Window('Send An Email', layout)

while True:
    event, values = window.read()
    if event in (sg.WIN_CLOSED, 'Exit'):
        break

The result of running this code with the 4 different imports results in these 4 windows:

PySimpleGUI (tkinter based)

tkinter

PySimpleGUIWx (WxPython based)

wx

PySimpleGUIQt (Qt based)

qt

PySimpleGUIWeb (Remi based)

web

Why Support Multiple GUI Frameworks?

The reason for being able to run PySimpleGUI on many frameworks is that each framework has a different look and feel, and each has unique features.

Some examples include:

  • Both the Wx and Qt ports support the System Tray
  • Qt has a Dial Element
  • Web runs in a web browser
  • Wx support screen readers for vision impaired users

Multiple ports also provide users with options should one of the frameworks stop being developed, an event that would normally be catastrophic to an application. It would mean an application would need to be rewritten, entirely, from scratch. Using PySimpleGUI to build the application, if a framework stops being developed or is no longer supported, the option to switch to another framework could save an application from being abandoned entirely or incurring the cost of developing a new version from scratch.

Licensing requirements may also play a role in moving from one framework to another. If the cost of using one framework is prohibitory expensive, then using one of the other ports may result in a more cost effective application. Maybe the commercial license for one of the frameworks is too expensive for a particular application.

Single File Module

One trait all 4 of the PySimpleGUI ports have in common is that they are each contained in a single Python source file. The filename for each port is:

  • PySimpleGUI tkinter - PySimpleGUI.py
  • PySimpleGUI Qt - PySimpleGUIQt.py
  • PySimpleGUI WxPython - PySimpleGUIWx.py
  • PySimpleGUI Web - PySimpleGUIWeb.py

Why only 1 file? The reason is simple. Simplicity.

Having 100% of the module contained in a single file enables you to easily get PySimpleGUI onto your system. If your computer isn't connected to a network and thus installing via pip is not possible, then all you have to do is copy this one file into the folder with your application. With the PySimpleGUI Python source file in your application's folder, you can then import the module the same way you would if you had pip installed it.

An Important Reality Check

The PySimpleGUI architecture was designed with this portability in mind. It enabled the multiple frameworks you see above to be supported so that PySimpleGUI application code is both highly portable and features that are unique to some frameworks can be used. Coding features so that they run on all 4 frameworks is labor intensive and expensive.

Like all development efforts, the PySimpleGUI had resource limitations. A decision had to be made between:

  • Support all 4 platforms while slowly growing the number of features
  • Grow the features of the tkinter port more quickly, at the expense of the other ports

In 2020 the decision was made to put all of the development effort into the tkinter port. This enabled the tkinter port of PySimpleGUI to be the feature rich and powerful library that it is today. The downside to this decision is that the other 3 ports of PySimpleGUI have not "kept up" with the tkinter port.

In other words, in 2019 much of the PySimpleGUI code a user wrote could be run on all 4 ports with minimal changes. The more advanced features written after 2019 are not available in the non-tkinter ports.

Example Features Unavailable

A few examples of features that have not been ported from the tkinter port to the other 3 ports include:

  • Element expansion
  • Exec API
  • User Settings API
  • Global settings
  • PySimpleGUI Debugger
  • cprint - Not available in Wx port

Status of Each Port

The tkinter and Qt ports are the more "complete" of the 4 ports. As features were developed for the tkinter port, they were added to the other ports in this priority order:

  • Qt
  • Web
  • Wx

The Qt port received the most attention of the 3 non-tkinter ports.