Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announcements #142

MikeTheWatchGuy opened this issue Sep 6, 2018 · 927 comments

Announcements #142

MikeTheWatchGuy opened this issue Sep 6, 2018 · 927 comments


Copy link

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 6, 2018

Announcements - New Features, Design Patterns, and Methods

I'm unsure how GitHub sends out updates. I don't think people are informed about Wiki changes for example. I've been announcing new features and more importantly, new ways of doing things, on the Wiki. I'm going to put announcements here so they are more visible. If there are objections about the traffic, well, what can I say, it's a busy/active project.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 6, 2018

New use pattern - Element lookup using Keys

keys can be used to lookup Elements. As a result, all Elements are capable of having a key, including non-output elements such as a Text Element.

To get an element object from a form, you call

This is the new, preferred method for doing Updates on elements.

Previously if you wanted to output something to a Text Element, you needed to create the text element outside of the form layout and keep that text element variable around so you can call text_element. Update('new text')

The new design pattern is thus:
In your form layout, include a key on your Element:

layout = [[sg.Text('My text', key='text')]]

Later in your code you can update this Text Element by making this call, assuming the variable form is your FlexForm object:

form.FindElement('text').Update('new text')

The Demo programs have all been updated to use this new technique. This capability and its impact on the length of programs led to pushing version 2.30 out the door quickly.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 6, 2018

Borderless Windows are Here

Try them on your next form.
Add this to your FlexForm call:
no_titlebar = True

You can expect to see some of these in the Demo programs.

borderless grayed buttons

You can click anywhere on the window and drag to move it. Don't forget to put an exit key on these windows.

Be sure and make an "exit" button or you'll be running task manager to close your windows. The reason is the when you turn on this option, you will not see an icon on your taskbar for the window. This happens on both Windows and Linux. Thus, if you do not supply an exit button, the user will have no means to close the window.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 7, 2018

Grab Anywhere

Tonight's change is perhaps going to be a really cool thing or one that is going to piss people off.

But, hey, I like it this way. If you don't, setgrab_anywhere = Falsein your call to FlexForm.

As the name implies, you can grab and drag your window using any point on the window, not just the title bar. I was only enabling this when the title bar was turned off. I think it's a much superior way to interact with a window.

FlexForm is becoming quite the call!
def __init__(self, title, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size = (None, None), auto_size_text=None, auto_size_buttons=None, scale=(None, None), location=(None, None), button_color=None, font=None, progress_bar_color=(None, None), background_color=None, is_tabbed_form=False, border_depth=None, auto_close=False, auto_close_duration=DEFAULT_AUTOCLOSE_TIME, icon=DEFAULT_WINDOW_ICON, return_keyboard_events=False, use_default_focus=True, text_justification=None, no_titlebar=False, grab_anywhere=True):

So, enjoy a lazy way of interacting with windows on me.

You will want to turn if off for forms with a SLIDER. you need the slider to move, not the window. I'll update the Demos that use sliders to turn off the grab_anywhere.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 7, 2018


This one has been requested a number of times. Rather than make a Table Element, decided to see if the current PySimpleGUI is capable of making nice tables using standard Elements. The answer seems to be yes, it's possible with existing Elements. The key was to enable text justification in the InputText element. By right justifying the text in those Elements, it's possible to create a nice looking table.

Here's an example using a ComboBox and Input Elements.

light table

You'll find the code that generated the table in the file It requires the latest PySimpleGUI from GitHub in order to use the justification setting.

This is a "live keyboard" demo. It updates the table values as you are typing.

There are 3 fields at the top of the table. If you enter a value into the 3rd field, the cell that the other 2 cells represents will be changed to that value. Enter 1, 2, 1234 and cell (1,2) will be changed to 1234.

There is a new trick demonstrated in this demo that shows off the power of Python. Rather than pass in a string as the key to the Input Elements, I passed a tuple. Nothing about the key requires it to be a string. The only requirement is that you use the same type to look up the element when you call FindElement or use the key to read the return values.

This is the code that makes the Input Elements:

    for i in range(20):
        inputs = [sg.In('{}{}'.format(i,j), size=(8, 1), pad=(1, 1), justification='right', key=(i,j), do_not_clear=True) for j in range(10)]

See how the key is set to (i,j). This allow me to easily find the Element that is represented by (i,j) later. What to access the cell at (0,0)? This you would make this call:

Hopefully this is enough capability for the folks that need tables in their forms/window.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 7, 2018

Three Point Oh!

So maybe I kinda screwed up the numbering when the last one became 2.30. I didn't think about it looking like 2.3 also. Doh!

There have been a lot of changes lately so perhaps it's time for a major bump.

It's a clean slate

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 8, 2018

keep_on_top = True

What might this setting do in a call to FlexForm? If you guessed create a window that's ways on top you're right.

This one little flag enables cool floating toolbars that stay on top of all of your other windows. I'll admit a large portion of this project is for selfish purposes, that I have a platform to develop tools on top of.

Now I've got this nifty toolbar on the top part of my screen, always ready to launch or do something.

floating launcher

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 8, 2018

3.0.2 release today to turn off the grab_anywhere feature for non-blocking forms. tkinter is printing out a warning/error message when the form is closed using a button. Doesn't appear to have any effect on the overall functioning, but it's distressing to see. Better to disable this feature for now.

Plan is to add back an override mechanism should a user want it.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 8, 2018


Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 8, 2018

Floating Toolbar - New demo program

This is an always-on-top, compact floating toolbar. They are super-handy to leave running. Something satisfying about writing code that then gets used often, especially if they make you much more efficient.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 9, 2018

Async Forms

Updated the Readme / primary doc to discuss the use of non-block forms.

As explained in the documentation there are a number of techniques to move away from async forms including using the change_submits = True parameter for elements and return_keyboard_events = True

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 9, 2018

Floating Desktop Widgets

I've discovered that in about 30 lines of code you can create a floating desktop widget.


If you click the pause button, it switches to Run.


This "Widget" is always on top of the other windows.

Looking for a way of launching these in a way that have no taskbar icons. If launched from PyCharm it behaves this way. If launched from a Toolbar, the toolbar's window is attached to the timer. Close it and the timer closes.

This demo is the first time I've ever combined a ReadNonBlocking with a Read in the same form. The reason for using it in this program is that while the timer is paused, there' s nothing happening so why have the program running the loop when it can wait for the user to do something like click a button. When the button is clicked we return from the Read call.

Thank you to jfong for sending an interesting version of this program. His ideas have rolled into a into the project code many times.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 10, 2018

Menus are done

The last of the big features, Menus, was just released to GitHub. With it comes the ability to get the look and feel of a windows program. I don't know if the architecture will lend itself to being used this way or not, but it did seem like a useful feature to add..


Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 10, 2018

3.7 Support

Thanks to @mrstephenneal we can now say that PySimpleGUI works on Python 3.7. There was a button issue causing trouble. Looks like it's fixed now so I think 3.7 is now safe to with PSG.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 10, 2018

Release 3.01.00

Menus! (and a Listbox.Update bug) are the big features.

Since the Menu code is somewhat isolated, and I want to get some users on it, decided to go ahead and push it all out there in 3.01.00

I didn't mention this in the readme section on menus, but by default (you can't currently turn it off) menus are detachable. If you double-click the dashed line then you get a floating version of that menu. Should make for some pretty interesting user interfaces?

tear off

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 10, 2018


There have been enough bug fixes to trigger another PyPI release. People have been doing more and more with the Update method. These fixes were mostly in those methods.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 11, 2018

Update methods updated

Added the ability to enable / disable all input elements.
Set parameter disable=True to disable, disable=False to enable, disable=None to leave it alone

A number of Demo programs also refreshed.

Expect a PyPI release soon.

Note that some Update method changes also changed parameter names from new_value to value, new_values to values. Some were different than others. Removed new_ so they all match now. Sorry to those living on the bleeding edge!

Here's a before/after. Elements towards the bottom of the window were disabled.

Yes, even buttons can be disabled now. No more needing to gray out your own buttons!


Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 11, 2018


Big change this time around is the ability to disable widgets. All input widgets have an Update method that has the parameter disabled that you set to True if you want to disable it.

A few critical bugs in there too which pushed up the release to today.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 12, 2018

Resizable Windows, Font settings for input text elements, beginnings of Treeview Element

You can stretch windows bigger now and some of the elements will resize with the window. **

The Input Text Elements did not have a functioning Font setting. Doh! Don't know how that got missed.

The very beginnings of the Treeview element are in there.

Hopefully nothing was broke. Any time I make changes to the core widget packing I get nervous!

** Had to turn off some of the Resizable windows features....Buttons and other elements were moving / expanding in forms that I didn't want the to expand. The change fucked up too many elements to leave on for now.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 12, 2018

Two new Demo programs - CPU Desktop Widget, Spinner Compound Element

Added another Desktop Widget to the demos. This one shows the CPU utilization.

cpu widget

The spinner allows you to change how often it's refreshed

The Spinner Compound Element was done in response from a user wanting to see a different kind of spinner. This one has larger buttons and is laid out horizontally.

spinner compound

The point of this demo is that it's possible to put together multiple Elements into a higher level element. There aren't many of these I can think of at the moment, but given how many user questions are asked, something else is bound to be asked for.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 13, 2018

Table Element, Complete rework of Popups, Death of MsgBox

You can blame the Popup changes on this issue:

All of the Popups were rewritten to use a long list of customization parameters. The base Popup function remained more or less the same.

Decided while I was going all the Popup work that it's time to completely remove MsgBox. Sorry all you early adopters. You'll need to do a bulk rename and then you'll be fine.

Table Elements

Finally have something to show in the form of tables. The element name is Table. While the tkinter Treeview widget was used, many of the parameters were not exposed. If they were, the caller could really mess things up. Better to present a nice "Table-friendly'" interface than something specific to tkinter. After all, the plan is to expand PySimpleGUI to use other GUI frameworks.

A Demo program is in the works.

It's possible to add scrollbars to the Table element by simply placing it into a Column element.

There's still work to do and a good number of bugs, but I encourage you to give it a try.

scrolled table

If you do not put the Table Element inside of a Column, then you can still view and scroll the table, it just will not have scrollbars.

There is a problem currently with keyboard input when placed into a Column. The keyboard keys work fine when NOT inside of the Column but stop working when placed inside a Column Element.

This program will read a CSV file and display it in a window.

import csv
import PySimpleGUI as sg

filename = sg.PopupGetFile('filename to open', no_window=True, file_types=(("CSV Files","*.csv"),))
# --- populate table with file contents --- #
data = []
if filename is not None:
    with open(filename, "r") as infile:
        reader = csv.reader(infile)
            data = list(reader)  # read everything else into a list of rows
            sg.PopupError('Error reading file')

sg.SetOptions(element_padding=(0, 0))

col_layout = [[sg.Table(values=data, headings=[x for x in range(len(data[0]))], max_col_width=8,
                        auto_size_columns=False, justification='right', size=(8, len(data)))]]

layout = [[sg.Column(col_layout, size=(1200,600), scrollable=True)],]

form = sg.FlexForm('Table', grab_anywhere=False)
b, v = form.LayoutAndRead(layout)

It's another bit of PySimpleGUI "challenge code"..... The challenge is to do the same operation in another GUI framework in less lines of code. I would enjoy seeing the tkinter code required to create the window that this 20 line PySimpleGUI program creates. Most of the code deals with reading the CSV file 👍

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 14, 2018

Linux Virtual Environment

I finally installed VirtualBox and am running Ubuntu Linux. I tried to install the Mint distro, but the display was scrambled when it booted.

I was surprised how close the Linux screen shots look to the Windows.

ping graph linux
toolbar linux
all linux
ping linux

Even Pong worked the first time.

I don't believe that Python has been labelled the "go to language" for doing cross-platform GUI work. I guess I never stopped to think about it. I don't recall seeing this kind of thinking in posts or books I've read on Python. Perhaps it's time for that to change?

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 14, 2018


Released a new release to PyPI. Sorry about all these releases, but features continue to pour into the code. I'm finding even the folks that are actively using PySimpleGUI only run the pip installed version rather than the GitHub version. That means if I want runtime on the code, I'm only going to get any is to do a full release.

There were a number of changes that could f-up, so be on the lookout. The biggest addition to 3.2.0 was the Table Element (beta quality at the moment).

If you are running older programs then you may crash due to missing functions, MsgBox and several others. This is because I've moved 100% to Popup calls. It's not like I haven't been warning people so I don't expect complaints.

Some people are calling ReadNonBlocking prior to your Event Loop so that the form gets fully made. This call is needed if you want to perform actions on elements prior to calling Read. For example, if you want your form to be shown with some Elements set in the disabled state (using calls to Update), you will need to make an additional call after your Layout call.

Instead of calling ReadNonBlocking in these situations, you can call Finalize/PreRead/PrepareForUpdate. I have not been able to standardize on a name, so I'm providing multiple. I'm sure a winner will emerge. I've been using Finalize.

The call sequence becomes this:

while True:
     b, v = form.Read()

You'll also find the Finalize call used in the scripts that use the Canvas Element.

See the Readme for more info on what's in the release. Note that the readme has not yet been updated with the Table Element and several other changes. There's only so much I can do.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 15, 2018

One Line Progress Meters

PySimpleGUI has always had a one-line progress meter called EasyProgressMeter. However, that function has a limitation of only 1 meter being active at a time.

The new way to do Progress Meters is the function OneLineProgesssMeter.

All of the documentation and examples will reflect this new function.

Have to say it's nice to be able to run as many meters as desired without having to worry about more than 1 being on the screen at a time.

I intend to remove EasyProgressMeter within the next 5 or 6 releases to PyPI. I tried to insert a warning in the code, but too much code was shared to fit the message in.

I'm sorry about the change, but really would like to both add this function and rename the capability to something very descriptive. If there is enough revolt over removing EasyProgressMeter, I'll leave it in and simply drop it from all the documentation.


Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 15, 2018


Yea, yea, it seems like only yesterday that version 3.2.0 was released. That's because it WAS only yesterday. I've been busy.

There are 2 changes I wanted out quickly....

  1. The ability to turn off displaying row numbers
  2. The new OneLineProgressMeter function

The Progress Meter feature alone is a great use of PySimpleGUI. A number of users are using it only for this purpose in their programs.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 16, 2018


New demo program - graph ping using canvas.
I'm thinking about creating a Graph Element, something that makes it super easy to users tog create graphs, both line and x,y plot. The demo should how to take a canvas element and graph ping times.

There is another ping-graph demo using Matplotlib. This graph only uses tkinter.

Finally, because the pings take a long time, I moved the ping calls outside of the GUI event loop. Calling ping inside event loop was causing the GUI to respond sluggishly. This is because the ping was taking 1 second which means the gui wasn't being refreshed / wasn't responsive during the second. Now the GUI sleeps for 200 ms while the ping is done by a thread.

This is yet another toe in the water with threading. The problems I saw in the past are no longer there, it would appear.

I also checked in the file that you need for this demo. It's a pure python implementation of ping and works pretty well, even if slow.

ping graph

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 16, 2018

Progress Meters

Thanks to @JorjMcKie I've learned more about the performance of the EasyProgressMeter and thus probably the OneLineProgressMeter. The more arguments to display the longer it takes.

Was going to document in the Cookbook / Readme that if you have performance concerns, you can call the progress meter less frequently. You don't have to update it 1 count at a time. It could be like this:

for i in range(10000):
    if i % 5 == 0: sg.OneLineProgressMeter('My 1-line progress meter', i+1, 10000, 'single')

This meter is only called every 5 times through the loop. It finished quite a bit quicker than the test updating the meter every single time.

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 16, 2018

PySimpleGUI programs as an EXE file!

The biggest thing to hit PySimpleGUI since Colors.... the ability to run programs written for PySimpleGUI as an exe file. ALL credit goes to @JorjMcKie for this.

There is no need to distribute Python with your programs. It's all included in the exe and folder of supporting files.

From what I understand of nuitka, this code is compiled C++ code, not python code. The performance is thus potentially better! It's the best of both worlds.

Working to get the process documented. It's tricky and required a special script. Stay tuned....

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 16, 2018

Graph Element

This one is pretty exciting as it does something new on the screen. The Graph Element allows you to easily create a canvas and draw on it using your own coordinate system. You don't need to do conversions from your graph coordinates to the tkinter canvas graph coordinates.

The Demo program for it is a good example. It displays a pint graph. The graph we're creating is a line graph what we would like to to from 0,0 in the bottom left to 100, 500 in the upper right. This will give us 100 data points along the x axis and up to 500 ms on the y axis.

After creating the Graph Element, we can do 3 operations on it:

  1. Draw Line
  2. Draw Point
    3 Erase

The draw line draws a line from 1 point to another. The points are specified using your graph coordinates, not the tkinter canvas coordinates.


I know I have a LOT of documentation to do.

In the meantime, try using Control+P if you're using PyCharm. Press Control+P while you are typing in the parameters and you'll see a popup showing you what the legal parameters are. This feature is almost necessary when using PySimpleGUI because functions have SO many optional parameters.


I hope to see some cool creations using the capability. I'm starting to see more and more projects pop up on GitHub that use PySimpleGUI! Keep those examples coming! And keep the requests for new features coming too. They have made this such a better package because of your help.

Sample code:

This is your layout:

    layout = [  [sg.T('Ping times to', font='Any 18')],
               [sg.Graph((300,300), (0,0), (100,500),background_color='white', key='graph')],

    form = sg.FlexForm('Canvas test', grab_anywhere=True)

To draw a line, call DrawLine:

form.FindElement('graph').DrawLine(from_point, to_point)

Copy link
Collaborator Author

@MikeTheWatchGuy MikeTheWatchGuy commented Sep 17, 2018

Movable Graph Element

Made the Graph Element "movable". This means the graph can be shifted when it reaches the "End".

Here's a 1,000 data-point ping graph or 16 minutes woth of pining


Copy link

@PySimpleGUI PySimpleGUI commented Mar 21, 2021

4.38.0 PySimpleGUI 21-Mar-2021

The "so much for no new releases for a while" release

  • Changed name of the NEW parm in Multiline element from scrollbar to no_scrollbar
    • This matches the other elements that also have this same parameter (Listbox)
    • Wanted to get this release posted prior to users writing code that uses it (it's only been 1 week)
    • This is the actual purpose for the release... so that it doesn't linger to the point it breaks being backwards compatible
  • Some additional debugger stuff... nothing to see here... keep moving.... will let you know when there's more
  • Added icon parameter to popup_scrolled
  • New Exec API call - execute_find_callers_filename
    • It basically looks backwards until PySimpleGUI isn't found
    • Hopefully will help in error messages to determine who is calling PySimpleGUI
  • Made a constant variable for the & char used by Menus in PySimpleGUI for shortcuts
    • Also fixed a couple of places where they were being erroneously stripped from the normal menu text
  • Better error reporting for duplicatea keys
    • Found a problem with using print for errors - rerouted stdout/stderr can cause MORE errors
    • Interestingly, popups work great for these errors as they do not havea cascading error effect
Copy link

@PySimpleGUI PySimpleGUI commented Mar 22, 2021

New Rainmeter-Style Desktop Widget TEMPLATE

Really happy with the way this Demo Program turned out.

In under 100 lines of code you get a template that provides all of the features you would likely want/need in a desktop widget.

You'll find it here:

Here's the Template in use

Desktop Widget Template

It has a solid feature set that I think you'll find can be used to create just about any Rainmeter style widget you would want. This one feels like a mature template to use. This feature list is in the comment at the top:

It has many of the features that a Rainmeter-style Desktop Widget would have
* Save position of window
* Set Alpha channel
* "Edit Me" which will launch your editor to edit the code
* Right click menu to access all setup
* Theme selection
* Preview of window using a different theme
* A command line parm to set the intial position of the window in case one hasn't been saved
* A status section of the window that can be hidden / restored (currently shows last refresh time)
* A title
* A main display area

I used the template to create this date widget:


It took under 5 minutes to write the Date Widget using the Template.

It has a full complement of right-click menu items



If you make something, please post a screenshot in your readme, and post one in Issue #10. It does not have to be a fancy program in order for others to be inspired and learn something from you.

Copy link

@PySimpleGUI PySimpleGUI commented Mar 23, 2021

Twitter Poll - What OS Do You Use with PySimpleGUI?

Copy link

@PySimpleGUI PySimpleGUI commented Mar 30, 2021

The Window.write_event_value problem

For a number of months the implementation of write_event_value was working well.

But, it too started to exhibit the familiar problem of "not in the mainloop". I spent a large chunk of time on this over the past few days and I understand the problem better than ever.

I had one solution that looked like it completely solved the problem, but like any intermittent error, it eventually showed the same issue. I feel like I'm getting close to a solution.

In the meantime, the absolute safest thing for your application to use is a queue for your thread to talk to and an event loop with a timeout that checks this queue.

This demo shows the basic mechanism:

A queue object is created. The Thread calls the put method for the queue.

The event loop is running with a Each time through the event loop, the queue is checked.

This type of polling operation certainly has a downside of latency and CPU usage, but it's the safest approach.

I hope to have some GREAT news on this soon. Thank you for your pateince!

Copy link

@PySimpleGUI PySimpleGUI commented Mar 31, 2021

NEW on GitHub (

Listbox Better Theming

The selection color has always defaulted to the blue that Tkinter provides.

As PySimpleGUI grows and evolves, these details fill in over time. My gosh how far things have come over 2.5 years!

July 2018, the first release has this:


2 1/2 years later we've got 4 ports, and now hot Listboxes!

The upper left corner is how the highlighting worked before today's changes.

The window below that one shows the new highlights with a standard titlebar. The other windows have Custom Titlebars. Very happy with these results! MUCH more appealing in my opinion. It doesn't push my "something looks off" button now.


The Dark Red one was an incorrectly chosen image. I was testing turning off this theming. Here is how it actually looks with the defaults.


Macs can use TK Buttons

There was a request for Macs to be allowed to use tk Buttons instead of being forced to ttk only. This was a fine request to make. I don't think I meant to be so exclusionary. I prefer to allow rather than dis-allow when possible. It may not work out well for you, but actively blowing you from trying is not the approach I want to take.

You will need to set the ttk indicator on each button that you want to be a tk button.

The parameter use_ttk_buttons in the Button element is how you will need to indicate it. Working at the Window level won't do it. It's got to be explicitly set on the Button.

Giive this code a try....

import PySimpleGUI as sg

layout = [  [sg.Text('My Window')],
            [sg.Button('Go', use_ttk_buttons=False), sg.Button('Exit', use_ttk_buttons=False)]  ]

window = sg.Window('Window Title', layout)

while True:
    event, values =
    print(event, values)
    if event == sg.WIN_CLOSED or event == 'Exit':

Copy link

@PySimpleGUI PySimpleGUI commented Apr 2, 2021

Heads-up on PIL + Python 3.6

Big distraction hit yesterday.

The function I've used everywhere for PIL connecting up with PySimpleGUI has a pretty big issue when running on 3.6 that I wasn't aware of until I hit yesterday. The Digital Picture Frame desktop widget was supposed to be a QUICK little personal project lasting an hour, tops, as a warm-up exercise for the day.

I had no idea the rabbit hole would end up doing down, and down. It's still not solved.

The effect is a rippling one where priories have gotten pushed down, like a stack.

I'm sorry about this, but it's the nature of software development.

One reason for it taking a top priority spot is that PySimpleGUI is used in Mike Driscoll's new book on PIL, and the last thing I want to see happen is for PySimpleGUI to cause that book any harm. So, it has jumped the normal priority queue and rose to the top quickly.

For what it's worth, it does not appear to be a PySimpleGUI problem itself, but it does heavily impact PySimpleGUI. The PIL function I've been using is portable across the PySimpleGUI ports, but it's the one now with a problem.

I'm sorry about the detour. Hope to be back on track very soon.

Copy link

@PySimpleGUI PySimpleGUI commented Apr 3, 2021

Update on Issue Bot and Issue GUI

The Issue checking bot is in the final stages of testing for deployment.

I'm reworking the form in the meantime as well.

Since the bot closes issues, I'm going to manually close them or Jason will if they lack the form. The incoming issues should be clean and not littered with posts that have 1/2 or less of the info needed.

I've been working on a GUI that will go directly into PySimpleGUI. This will remove the need for you to collect the versions, etc.

It looks like we'll be able to also not just generate the markdown, but also paste it into a new issue, paste in the title, and get everything ready for you to hit submit.

It stops short of submitting so that you can easily drop in screenshots. For those, it's a paste operation or a drag and drop.

Trying to get this done by the end of the weekend, but not sure if I'm going to get it all done by then. Trying....


Copy link

@PySimpleGUI PySimpleGUI commented Apr 4, 2021

Give Kindness

A friend sent this to me today and I think it's worth remembering. I've written it down and hung it next to my computer.

Life is an echo.
What you send out, comes back.
What you sow, you reap.
What you give, you get.
What you see in others, exists in you.
Remember, life is an echo.
It always gets back to you.
So give kindness...

Copy link

@PySimpleGUI PySimpleGUI commented Apr 5, 2021

Happy Easter-Egg

I hope everyone had a fun Easter with loved ones, friends, a pet, your houseplant, or PySimpleGUI... or wherever you find joy.

Right click tearoff

A new feature snuck into the code that's not documented in the docs yet and is available on GitHub.

Right-click menus can be made to be torn off by setting a flag when you create the Window. This screen capture shows the effect. It a very interesting capability that will be interesting to see how it's used.

Copy link

@PySimpleGUI PySimpleGUI commented Apr 6, 2021

The GitHub Issssue Poster GUI is Ready for Beta....

Last night I released a new Demo....

This code is going to be INSIDE of PySimpleGUI itself, but for now it's a demo so it can be easily tried out.

It will create the markdown form for you, fill it in, open up the webpage.

Try it!

I wanted to make the experience better for you, the user, prior to a bot release.

It's taken a lot over work over the past few days and I hope it's up to the standards that you've all come to expect.

Note that the theme is based on your current GLOBAL theme setting that you set in sg.main() which is why this screen capture shows a window that is Dark Gray 13 themed.

I want this Issue process to be nice for everyone. The idea is to provide you with the BEST support possible, in the most efficient manner.


Copy link

@PySimpleGUI PySimpleGUI commented Apr 6, 2021

Every Screenshot is Inspirational

The reason I say this, over and over, and Tweet it too, is that it's true. nothing is too small to see.

I hacked oni a little sample code I received. What FUN!

ALL CREDIT, 100%, goes to @neovich

It's too much fun to watch and not share this.....


Copy link

@PySimpleGUI PySimpleGUI commented Apr 9, 2021

Issues GUI

Please try the demo program when you need to log an issue next time. I don't yet have it in the PySimpleGUI code, but it will work the same except instead of running a demo, you'll call a function.

Recent "Interesting Additions" in

Realtime Button

As the lessons keep moving... on Buttons.... some stuff is being changed along the way. I'm also trying to deal with some of the Issues, but it's difficult to balance things perfectly.

RealtimeButton is a working feature again (yeah!). There's a new demo program that is replacing the quite dated Pi Robotics demo.


Basic Right-Click Menu Constant

MENU_RIGHT_CLICK_EDITME_EXIT = ['_', ['Edit Me', 'Exit']]

You'll find that pretty much all of the newer Demo Programs have an Edit Me capability. You can get this really basic menu that has an "Edit Me" and an "Exit" entry by adding the constant with the right_click_menu parameter to your Window creation:

window = sg.Window('Window Title', layout, finalize=True, right_click_menu=sg.MENU_RIGHT_CLICK_EDITME_EXIT)


If you want to add the editing capability to your program, you'll need to set up the editor in the global settings via sg.main() and then add this if statement to your event loop:

        if event == 'Edit Me':

Right Click Menu Tearing Off

New Window parameter:


If True, then your right click menus can be "torn off". They become little floating windows that you can use to control your program.

This feature addition is what made this feature possible/interesting.....

popup_menu - a New Popup Function

This is a weird feature that was easy to drop in because of the internal PySimpleGUI menu data structure parsing/building functions. While adding the tearoff right click menu above, it was clear a more general purpose popup menu is possible.

You'll need to supply some parms like the window and an element within your window. They're needed by tkinter, but aren't going to restrict you in terms of the location. You can specify a location anywhere on the screen. The default location is the upper left corner of your window.


More Permissive Layouts

This is a bit of an experimental feature. It will allow you to have another level of layouts. It buys you nothing in terms of things ending up in different locations. But, it does provide for the appearance of User Defined Elements to be like a normal element. Your function can return a row, and with this code change, a row can have a row.

It has a downside in that you can make a mistake that was caught previously and now it'll instead emb3d the error rather than flagging it.

Updated Collapsible Sections Demo

The Collapsible Sections demo was updated.


This demo has a User Defined Element, but because it's only 1 element, a Column, it can be placed inside of [ ]. If this function instead returned a list of elements, then previously that would have had to be outside of [ ] like the "layout helper" functions are today.

Demo Browser New Features

Seeing how I live in this program much of the day, it gets improved upon.

Two features were recently added. The first is hotkeys on the main window. F1, F2, F3 will switch between searches.


You can also define what a double-click of the file list does using a setting in the settings window:


A double click can run or edit the program.

They save a little time, but do add up over time.

Copy link

@PySimpleGUI PySimpleGUI commented Apr 9, 2021

The s Alias

I forgot to mention one of the more exciting and time-saving additions! Elements in have an s parameter that is an alias of the size parameter. They work just like the k parameter does for key. You can use either. If you choose both for some weird reason, size takes priority.

This will save keystrokes of course, and for those inline GUIs, it saves significant space. You can use the Element, key and size aliases to get the layout size quite small.

    layout = [  [sg.T('My Window')],
                [sg.I(s=(15,1), k='-IN-')],
                [sg.T(s=(12,1), k='-OUT-')],
                [sg.B('Go'), sg.B('Exit')]]

Produces this window:


Copy link

@PySimpleGUI PySimpleGUI commented Apr 9, 2021

PySimpleGUI and Macs

I've looked at stats for installs, taken polls on Twitter of users, searched the GitHub projects that use PySimpleGUI so that I can get an understanding of the size of the Mac community.

This decision I've been pondering, support or don't support the Mac on tkinter, is actually related in many ways to the decision of supporting back to Python 3.4. It's a pain in the ass to support 3.4/3.5. Not using f-strings in the core PySimpleGUI code is a pain in the ass.... but.... in the end... it's worth that pain in the ass. Besides, it's MY pain, not anyone else's.

When I learned that Python started blocking the installation of Python on Windows 7 machines, it felt distressing. This decision bars people from using an otherwise open/free piece of software. It's a personal opinion, so sorry about venturing into this space. The reason I'm mentioning it is that it's related.

The decision to support 3.4+ was made so that the PySimpleGUI tent would hold more people. PySimpleGUI should be a welcoming package, not one of exclusion.

So, for this reason, I'm going to keep right on supporting the Mac running tkinter. I don't want to exclude a group of people that have been with this project from the very first days.

The Early Days...

In fact, when I look waaayyyy back... before Windows where Windows and instead were FlexForms....


I recall the immense feeling of satisfaction, happiness, joy, when I saw user @sfneal posted his repo dirutility (I'm sorry to put you on the spot here Stephen)


This utility ran..... on a Mac.

We're in this together

I can't turn my back on this group of users regardless of the problems currently being experienced on the Mac. I also can't justify not supporting them because it a "smaller number of uses" than the other operating systems.

So, Mac users, we'll slog out the problems together. I'm not going to abandon you. I don't know exactly how I'm going to be able to get through all the weird ongoing problems, but we'll find a way.

Copy link

@PySimpleGUI PySimpleGUI commented Apr 9, 2021

write_event_value update!

ooooo 8                   8                             
  8   8                   8                             
  8   8oPYo. .oPYo. odYo. 8  .o    o    o .oPYo. o    o 
  8   8    8 .oooo8 8' `8 8oP'     8    8 8    8 8    8 
  8   8    8 8    8 8   8 8 `b.    8    8 8    8 8    8 
  8   8    8 `YooP8 8   8 8  `o.   `YooP8 `YooP' `YooP' 
::..::..:::..:.....:..::....::...:::....8 :.....::.....:
     8                                    .oPYo. .oPYo. .oPYo. .o   88 88 
     8                                        `8 8  .o8     `8  8   88 88 
.oPYo8 .oPYo. .oPYo. ooYoYo. .oPYo. odYo.    oP' 8 .P'8    oP'  8   88 88 
8    8 .oooo8 8oooo8 8' 8  8 8    8 8' `8 .oP'   8.d' 8 .oP'    8   88 88 
8    8 8    8 8.     8  8  8 8    8 8   8 8'     8o'  8 8'      8   `' `' 
`YooP' `YooP8 `Yooo' 8  8  8 `YooP' 8   8 8ooooo `YooP' 8ooooo  8   88 88 

Wow I got a huge hand in getting this threading communications problem solved.

Best I can tell, the write_event_value problem of tkinter complaining about not being in the mainthread is SOLVED

I've thrown as much as I can think of at it. I've started 100's of threads, each sending multiple messages, and it continues to work with no problems.

Elated that we're going to not have to worry about this problem sneaking up on us anymore.

It's working on 3.6, 3.7, 3.8, 3.9 on Windows and Linux. I have not yet tried it on my Pi but I can't imagine it not working.

Mac users, please give it a try if you've got a moment. You'll have to get PySimpleGUI from GitHub as it's not on PyPI yet. I plan on posting a release this weekend. The version with the fix is

FINALLY can breathe easy and focus back on getting through the Udemy recordings. This one has been weighing heavy for quite some time and has been a distraction for weeks, so I'm really thankful for the help! Great job of researching this problem snd finding the solution.

Copy link

@PySimpleGUI PySimpleGUI commented Apr 10, 2021

Thank you PySimpleGUI Users (again and again)

The PySimpleGUI Dream Come True

This is an entirely new experience for me. It's a dream come true that I didn't realize I had as a dream.

PIL Book1
PIL Book4
PIL Book2
PIL Book3

Seeing PySimpleGUI code, in print, in a real book, written by my favorite Python book author is joyful feeling that overflows the joy cup.

It was the PySimpleGUI users that made this happen

I did not request that PySimpleGUI be used in this book. I didn't even suggest it. The Kickstarter campaign was already underway with several chapters of the book and the accompanying code completed.

It was the community that suggested and encouraged the switch.


If you want a copy.....

No pressure... not pushing this on anyone, but if you like what you see and want to maybe pick up a copy and help support Mike as a Python book author, you can get a copy "Pillow: Image Processing with Python"

Bought through Kickstarter, and being a "Book person", I bought both an ebook and a hard copy. I can't comprehend when reading electronically. Searching and skimming reference material, OK, I can use a PDF for that. But "reading"... just doesn't work right with my brain without a paper book. I don't know why, it just works that way.

I have so many people to thank

Let me start with the obvious one. Mike Driscoll has been a fantastic new friend. The support, help, encouragement, and so much more, has made it clear to me that Mike is one of those "good people" that I don't question the intent of. A solid human being. It's priceless to have those in the world, and I want to help support making it possible for people like Mike to do what they love. In Mike's case, it's teaching people Python and writing books (MANY books). I've been a long-time fan, but only in the past year or so gotten to know Mike better and wow, what a great person to know is part of the Python community. Hope is a priceless thing and he brings hope for me to Python.

I'll forever be thanking the PySimpleGUI users because you're the reason I work on this project. 🙏 You're the fuel for the passion fire.

It's SO MUCH FUN sharing in someone else's success or happiness. It's a weird selfish thing to do, much like volunteering. There's something you get back in return that other people don't necessarily see or feel without having experienced it. When you're successful and share what you've made, I feel a little of that happiness you're feeling. That's why the goals are # 1 Fun # 2 Your success. Do that and we're all happy and successful. So far, so good!

Copy link

@PySimpleGUI PySimpleGUI commented Apr 11, 2021

Release coming today.... 4.39.0

LOTS of stuff piled up that are going to PyPI today. Verision on GitHub is so over a dozen changes. One in particuilar, the "s" parameter, I'm looking forward to using, but has to be cross-ported to the new Qt port and the others too pretty quickly or else compatibility across the ports will suffer if you use this feature.

Buttons have been a focus because of the course and I'm working on the button lesson, so I wanted to get some changes in prior, like adding right click menus to buttons, fixing Realtime buttons

Issues GUI

I'm really on the fence about this. I've not heard a peep back from anyone about the demo program for issues. I'm assuming that means it's not been used/tried. So, rather than hold off on adding it oi the code, perhaps the best thing is to go ahead and release it to PyPI and let the real-world test it.

It'll take a little while to get it all integrated and tested today, but it's a day dedicated to the release of 4.39.0 anyway.

Copy link

@PySimpleGUI PySimpleGUI commented Apr 11, 2021

(Almost posted to PyPI.... it's on GitHub but running some additional tests)

4.39.0 PySimpleGUI 11-Apr-2021

Window.write_event_value is solid release!
The s parm debut (alias for size... works like k does for key)
GitHub Issues GUI

  • write_event_value fixed(THANK YOU daemon2021!)
  • GitHub issue GUI added - access via sg.main() or sg.main_open_github_issue()
  • s parm added to all elements
  • Element.block_focus - blocks an element from getting focus when using keyboard
  • Listbox
    • Set the selected colors to be opposite of normal text/background colors
    • Added highlight parms to Listbox so that they can be directly set
    • The expand method now works for Listbox element
  • Button on Mac can be tk Buttons
    • In the past the Mac could only use ttk buttons
    • Now setting use_ttk=False will cause the tk buttons to be used
  • Right Click Menu
    • Window get new parameter right_click_menu_tearoff to enable tearoff feature for right click menus
    • Buttons and ButtonMenuus can now use right click menus. Will automatically use the Window's right click menu
    • New constants
      • MENU_RIGHT_CLICK_EDITME_EXIT = ['_', ['Edit Me', 'Exit']] - a common menu for simple programs
      • MENU_RIGHT_CLICK_DISABLED = [[]] to block an element from getting a window's right click menu
    • parameter right_click_entry_selected_colors added to Window - a simple dual color string or a tuple - used for right click menus and pop_menu
  • Error windows - better line wrapping
  • Show an error window if a bad Image specified in the Image element
  • expand_x & expand_y parms for vtop vbottom vcenter,
  • Added framework_version
  • RealtimeButton works again!
  • New popup - popup_menu will show a torn off right click menu at the indicated location
  • new comment figlets
  • More permissive layouts - embedded layouts for PSG+ features
  • Added more symbols for buttons - double L/R & arrowheads,
  • Moved theme tests into a tab" in sg.main
Copy link

@PySimpleGUI PySimpleGUI commented Apr 11, 2021

4.39.1 PySimpleGUI 11-Apr-2021

The initial release had the old code! So, if you grabbed 4.39.0, then you actually have 4.38.0.

Please do another upgrade and you'll get 4.39.1

Copy link

@PySimpleGUI PySimpleGUI commented Apr 11, 2021

Issues GUI!

In 4.39.1 you can log a GitHub Issue using PySimpleGUI. It's a more pleasant experience, or it's meant to be.

In the very least, you'll receive some empathy from your weary PySimpleGUI helper as you fill in the information.


This video shows you how to do use the GUI starting by calling sg.main(). The first window you see is the main() window. You can directly call the Issues GUI as well by calling sg.main_open_github_issue()

Note that this GUI is only available in the tkinter version at this time. The PySimpleGUIQt reworking is just about complete. Adding this GUI is a high-priority item for that port.

GitHub Issue GUI

Copy link

@PySimpleGUI PySimpleGUI commented Apr 12, 2021

GitHub Issue GUI Screenshots....

These are the basic windows you'll encounter to log in Issue if you call sg.main()

First is the main window

Click the "OpenGitHub Issue" button


If you close the window, there's a confirmation screen so that you don't lose the information by accidentally closing the window.


Copy link

@PySimpleGUI PySimpleGUI commented Apr 13, 2021

PySimpleGUI Lore.... Properties?

Making the Udemy course has generated a fair amount of reflection on the architecture and design choices about PySimpleGUI.

Maybe a FAQ down the road can house some of this information.

The question has come up in Issues in the past and recently as well. The Properties question that I want to answer is:

Why not use properties for all settings?

TLDR Answer - for simplicity


Simple is the foundation of PySimpleGUI. It's right in the middle of the name. It has to be simple yet powerful, extendable, and be able to solve complex problems. Despite being simple, PySimpleGUI is quite capable of running quite a complex program. The "Simple" part does not mean incapable of use to solve complex problems.

Being simple opens the PySimpleGUI tent up to more people. Supporting back to Python 3.4 also helps make the PySimpleGUI tent large. The more people the better that are able to 1. Have Fun and 2. Be Successful.


PySimpleGUI is certainly different in the interfaces for programmers to use to build GUIs. From the layout to a single call to obtain both the event and the input values, PySimpleGUI is unique.


PySimpleGUI is so very far from perfect!

Improvements can be made in 1,000s of ways. Looking for ways to improve PySimpleGUI can start with the > 600 open issues, many of them enhancements.

When resource-constrained, prioritization of activities is critical.

Highest Priority

The highest priority items are:

  • Bugs that cause significant problems to a large number of people
  • Enhancements that enable capabilities that are entirely out of reach of users without the enhancement

The update method

As you're quite aware as a PySimpleGUI user, changes to elements at runtime happen via their update method.

This was a design choice in the first version of PySimpleGUI. I didn't want many methods/functions/properties that are used to change an element. I wanted one.

The benefits of this approach are:

  • Users can look at one line of code to determine what's possible to change
  • The documentation is not required, nor doc strings, in order to get the list of modifications possible
  • Easy to compare the capabilities between ports

Input Element

Let's look at an example... the Input element. Here is the update method's definition for that class:

    def update(self, value=None, disabled=None, select=None, visible=None, text_color=None, background_color=None, move_cursor_to='end', password_char=None)


Some exceptions exist. Some are by design. Others are by mistakes. It's a far from perfect package.

There are some methods that are common across all elements that are completed not via the update method, but instead using a method specifically built for that purpose.

Setting the focus is an example of this. It "feels like" an "operation" than a "setting". So, elements have a set_focus method.

Readonly Element Properties

One property that was added not long ago is visible. It's nice because you can use it in an expression. This line of code is from the Collapsible Sections demo program and demonstrates what I mean about it being useful in an expression.

        window[SEC1_KEY].update(visible=not window[SEC1_KEY].visible)

Metadata - a read/write property

For elements, the rare exception is metadata. It felt right to be a property. You can set it initially in the element and then access it as a property.

Why not do both?

Time & complexity.

I would rather stay simple than make a dual interface for the element's settings.

Hoping this helps

I dunno if it will help you understand the method to the madness, but I thought it worth communicating this.

Thank you to the fantastic PySimpleGUI community. You inspire me to do this!

Copy link

@PySimpleGUI PySimpleGUI commented Apr 23, 2021

Release coming this weekend

There was a big enough "oops" to get a release out asap. The proverbial 1-line-change to fix RelatimeButtons broke dragging events on Graph elements.

So, expect an A4 release over the weekend (you musician will recognize 440).

It has a number of changes that are somewhat nice. Some will be confusing because of how tkinter works on Linux versus Windows.

The reason for all this button activity is that Buttons are the current topic being recorded for the Udemy course. So, when I'm working on a lesson, I'm also fixing up that element as I go., I aw an opportunity to fix a couple of things, add a couple of "easy things" that cost me 2 days so there was NOTHING easy about them.... someday.... someday I'll learn....)

Seeing how the GitHub version is, that means there are at least 13 additions since the last release.


While I've got your attention.... I want to take a moment to say "thank you" to this wonderful PySimpleGUI user community. You're a fantastic lot! I couldn't ask for a nice group of people to be taking the journey with me.

It looks like a number of you are using the new GitHub Issue posting GUI built into sg.main(). THIS is exciting for me because it means it's saving you time and we're getting the information needed to provide the best support possible.

The vast majority of you are filling in the optional 'experience' question. I felt uneasy about this question and I've explained it many times, and it's talked about in the help pages as well. As someone answering the issues, it's been SO HELPFUL to understand a little bit about the person I'm conversing with. It helps me be on the same communication wavelength. The purpose is simple... to provide you with the best support we can. It is.... it is not there to embarrass you, or any other reason you might dream up.

So many of you say "thank you" when filing a bug. It's mind-blowing to see. It's helpful. It's impactful. It helps me have a better day. It's quite appreciated and it most certainly does NOT go unnoticed.

Keep Making! Keep Sharing!

THE way to learn to program is to do it. "Don't worry, be crappy". We all have to start somewhere. I'm a Python beginner too compared to many others out there in the world.

Please share what you make. Share on Twitter. She here in Issue #10. Share on the WIKI. It doesn't matter where. A screenshot is fine. Code is even better, but it's not a requirement.

I continue to learn from beginners. I look through the GitHub. I read some of what you're making. I learn from you guys and gals. I'm inspired by what you make.

Coffee and Sponsorships GREATLY Help

I don't feel comfortable making pledge drives, asking for financial help. But I'm going to ask this time anyway. It's been an expensive month for the PySimpleGUI project. Nothing you donate, none, zero, goes to me personally. 100% goes to:

  • Domain registration
  • ReadTheDocs
  • GitHub
  • Other programmers
  • Tools
  • Fiverr Vendors
  • Legal fees

It doesn't buy my food or pay my bills. PySimpleGUI is organized and managed as a company. It's different than other open-source projects in this way. It also means I personally am compensated last. The project has been and will continue to be in the red so that a paycheck won't likely come for some time, if ever. It does HELP this project greatly though, so I'm incredibly thankful for every coffee that every person buys. And of course to the monthly sponsors, OMG I'm so thankful for your help. The young programmers that you've helped pay thank you. The more funding available to the project, the more we're able to do.

Project Goals

Note that the project goals have not changed and that they don't have anything that mentions the financial stuff just discussed.

The PySimpleGUI's project goals are

  1. To have fun
  2. For you, the user, to experience success.

So far, these have served us all very well. I'm having fun. Everywhere I look I see others having fun... and I see tons of success happening. I feel incredibly fortunate to be able to do this with everyone. So, thank you for accompanying me on this journey. I am truly fortunate to have the support from this community that you demonstrate 🙏 Thank you from the bottom of my heart.

And thank you to @jason990420

Everyone has been particularly nice and shown great thanks to Jason, the one-man army that's ensuring your success. He's enabling me to work on the Udemy course while also providing you with top-notch support. I'm in awe of his skill, his generosity, and kindness. He sets a standard I aspire to be more like. Thank you for showing him you care.

Copy link

@PySimpleGUI PySimpleGUI commented Apr 24, 2021


One of the first places I ran PySimpleGUI in the browser was on REPLIT. It looks like I set up an account in Feb 2019. The initial use was for PySimpleGUIWeb from what I recall.

Then came the Trinkets .... Once I realized how much adjunct information that could be included on Trinket, I started to create a lot of demos on that site. At one point the Cookbook was FILLED with lots of embedded Trinkets. Then I realized that this SLOWED the page loading considerably... so, they were all removed.

The reason I'm working with it again is to make testing on Linux a bit easier and so that I can demonstrate the differences between Windows and Linux in the Udemy course.

Like so many of the external PySimpleGUI resources, these 2 sites are reachable using the address. It makes finding stuff a lot easier (for me at least.... maybe I'm selfish in this, but I'm going to pretend it was all done for you, the PySimpleGUI user):


I just created a copy of all of the demo programs as well as the Demo Browser and the GitHub (not yet released) PySimpleGUI, over to replit. This link opens that replit project.

Assuming I haven't left it in some weird state, you should see something like this:


The file is a copy of the Demo Browser. This is very handy when used with Replit because without it, you would need to use the shell to manually launch each demo.

I have configured the Demo Browser to launch a file if you double click it from the list.

There are some quirks that I'm seeing though:

  • The location parameter for windows seems to be ignored. Windows are always created at (0,0)
  • Getting a window to have no titlebar requires action on your part until I can figure out how to do it in code
    • After launching the program, right-click the virtual desktop and choose "restart"
    • This will remove the titlebar on any windows that shouldn't have one
  • Control-A does not select text

no_titlebar Fix

Here is what I meant in the list above.... the CPU Core Udage Widget is one of the "Desktop Widget"demos.


On my windows machine it looks like this:

When you right click the replit desktop, you'll see this menu that has the "restart" option.


After I chose it, the screen became this:


I'm impressed with the direction replit has taken Python and tkinter.

If you want to try it, be sure and do NOT choose the tkinter option when creating your replit project. Choose the normal Python option.

The Demo REPL

This is the state I've left everything. I have no clue if it will stay this way. Still a lot to learn.


Copy link

@PySimpleGUI PySimpleGUI commented Apr 26, 2021

4.40.0 SOON....

I'm shocked that it's the end of the weekend and 4.40 hasn't been posted to PyPI yet. There have been a number of problems with TTK buttons that popped up when testing with the new "Gray Gray Gray" theme (like the "default1" theme but more ..... descriptive?)

A number of things are slowing this down. The biggest is that buttons, both ttk and tk button, behave differently on Linux than on Windows. New features were added that allow you more control over the button colors (highlighting and active settings for example). I think I may be done with the coding, but there is enough testing left to go that I don't want to just jam this code up to PyPI.

I would rather delay a day than have anyone waste time on a problem that could have been avoided with some additional testing. So, delay a day it's going to have to be.

Copy link

@PySimpleGUI PySimpleGUI commented Apr 26, 2021

4.40.0 PySimpleGUI 26-Apr-2021

The "A4 Release" (440 Hz)
Buttons get a boost
Fix for Graph Dragging caused by last release
Gray Gray Gray should you wish to go colorless

  • Right-click Menu constant - MENU_RIGHT_CLICK_EXIT - Has only "Exit"
    • Constant = ['', ['Exit']]
  • Checkbox.get() now returns a bool instead of int
  • Button colors
    • mouseover_colors - new parm to Button. Sets the color when mouse moves over the button
      • When a TK Button this is Only visible on Linux systems when mouse is over button
      • On Windows, these colors appear when the button is clicked
      • Default is to swap the button's normal colors (text = background, background = text)
    • Close Window Only button type changed to work on all windows, not just non-blocking ones
    • ColorChooserButton - target now matches other choosers (target=(ThisRow, -1))
  • TabGroup - new size parm that will set size in either or both directions
  • Fix for TCL error when scrolling a column
  • Themes
    • Fix for COLOR_SYSTEM_DEFAULT error when choosing "default1" Theme
    • New Theme - "Gray Gray Gray" - sets no colors. The window will likely be some shades of gray
    • Changed error messages to use "theme" instead of the old "change_look_and_feel"
  • Debug window - problems were if set the erase_all parm and Debug window is then closed
  • timer_start, timer_stop - stop now returns the milliseconds elapsed instead of printing them
  • popup_menu - now uses the passed in the title if provided
  • GitHub Issues GUI
    • Made necessary changes to be 3.4 compatible. You can post Issues directly from your Pi running 3.4
    • Changed layout so that the window is smaller
    • New Help window uses tabs to make smaller
  • Fix for extend_layout when adding to a scrollable column
  • Added back functions accidentally lost during a PEP8 rework
    • added back popup_annoying, popup_no_border, popup_no_frame, popup_no_wait, popup_timed, sgprint, sgprint_close
Copy link

@PySimpleGUI PySimpleGUI commented Apr 27, 2021

Mini-Lesson "Know Your Customer"

Part of the enjoyment I get from PySimpleGUI is teaching programming in a broader sense. I try to make my videos so that they teach PySimpleGUI, but also something about the tools, about the user experience, and in this case, about the end-user.

I saw a recent Issue posted here reminding me that not everyone is on Twitter, THE single site I use to communicate globally.

So, I'm posting a link here to a video I made in response to a Twitter post I saw from a user about their lack of need for a GUI. They may be absolutely correct. They may not need a GUI for their program and it may in fact be a terrible idea for them to add one.

Purposeful programming is just as important as purposeful living. I'm not a fan of over-building. I'm not talking about planning for expanding your programs and making them highly extensible when I speak of planning. My point is WHO are you writing this program for. Who is your CUSTOMER?

You'll find the video here on the PySimpleGUI YouTube channel....

I don't have all the answers to anything. I do not know it all. There is SO much I don't know. Please keep this in mind for all of my work. These are my opinions, based on my experiences.

  1. Fun
  2. Success

Same goals as always. This video is targeting the "Success" goal.

Copy link

@PySimpleGUI PySimpleGUI commented May 1, 2021

Sorry about the Bot!

I'm really sorry that the Issues bot was enabled before I realized it would be taking action. I take full responsibility for this and am REALLY sorry this happened. The last thing I want to do is waste user's time (the whole purpose behind the form and process to begin with). It's a rare hiccup and I'll be more careful in the future.

Really sorry to @Zeus-HackOlympus in particular... you were quite patient and appreciate not only your patience, but persistence.

@jason990420 jason990420 unpinned this issue May 3, 2021
@jason990420 jason990420 pinned this issue May 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
16 participants