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

Open
MikeTheWatchGuy opened this issue Sep 6, 2018 · 1,239 comments
Open

Announcements #142

MikeTheWatchGuy opened this issue Sep 6, 2018 · 1,239 comments
Labels
All Ports All Ports announcements Announcements

Comments

@MikeTheWatchGuy
Copy link
Collaborator

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.

@MikeTheWatchGuy MikeTheWatchGuy added the announcements Announcements label Sep 6, 2018
@MikeTheWatchGuy
Copy link
Collaborator Author

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
form.FindElement(key)

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

MikeTheWatchGuy commented Sep 7, 2018

Tables

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 Demo_Table_Simulation.py. 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:
form.FindElement((0,0))

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

@MikeTheWatchGuy
Copy link
Collaborator Author

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

@MikeTheWatchGuy
Copy link
Collaborator Author

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

@MikeTheWatchGuy
Copy link
Collaborator Author

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

MikeTheWatchGuy commented Sep 8, 2018

RELEASED 3.0.2

@MikeTheWatchGuy
Copy link
Collaborator Author

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

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

@MikeTheWatchGuy
Copy link
Collaborator Author

Floating Desktop Widgets

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

snap0276

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

snap0275

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

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..

snap0204

@MikeTheWatchGuy
Copy link
Collaborator Author

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

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

@MikeTheWatchGuy
Copy link
Collaborator Author

3.1.1

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

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!

enabled
disabled

@MikeTheWatchGuy
Copy link
Collaborator Author

3.1.2

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

Table Element, Complete rework of Popups, Death of MsgBox

You can blame the Popup changes on this issue:
#204

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)
        try:
            data = list(reader)  # read everything else into a list of rows
        except:
            sg.PopupError('Error reading file')
            exit(69)

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 👍

@MikeTheWatchGuy
Copy link
Collaborator Author

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?

@MikeTheWatchGuy
Copy link
Collaborator Author

3.2.0

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:

form.Layout(layout)
form.Finalize()
element.Update(.....)
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.

@MikeTheWatchGuy
Copy link
Collaborator Author

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.

onelineprogressmeters

@MikeTheWatchGuy
Copy link
Collaborator Author

3.3.0

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

MikeTheWatchGuy commented Sep 16, 2018

Graphing

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 ping.py file that you need for this demo. It's a pure python implementation of ping and works pretty well, even if slow.

ping graph

@MikeTheWatchGuy
Copy link
Collaborator Author

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.

@MikeTheWatchGuy
Copy link
Collaborator Author

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....

@MikeTheWatchGuy
Copy link
Collaborator Author

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.

snap0282

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.

snap0283

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 Google.com', font='Any 18')],
               [sg.Graph((300,300), (0,0), (100,500),background_color='white', key='graph')],
               [sg.Quit()]]

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

To draw a line, call DrawLine:

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

@MikeTheWatchGuy
Copy link
Collaborator Author

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

scrollingping

@PySimpleGUI
Copy link
Owner

ChatGTP Is Not "All Bad"

I would like to counter-balance the "policy" posted above and the warnings for a moment,. as this is clearly useful technology.

While the hype around AI is likely at a deafening roar level in the media (I dunno... not paying attention to the news), and I've made several announcements about not using it to generate code, there is value in using the tools and have a concrete example.

I signed up for Bing's version some time ago and was recently approved. It's a powerful tool and I'll take one of those, thank you! It's a great search engine, but I still urge caution. I'm betting you wouldn't want to only see the first Google search result. The same holds true with these chatbots. They're highly skilled at being wrong with great confidence. There's no magic here. The more you can be mindful that these tools are 100% mathematical probabilities and language patterns with zero "intelligence", the better results you'll achieve by augmenting the answers with additional searches and other tools.

When ChatBots Have Different Opinions...

Prior to Bing's version, I have been using a PySimpleGUI front-end to OpenAI's ChatGPT. I've been hacking/customizing one that you'll find in this awesome user's repo:

https://github.com/MaxSSD/OpenAI-GUI

I've not researched enough about the implementation to understand how easy or difficult it is to manipulate responses. From this test, I think it's clear that there's a fair amount of control the developers have.

When I asked the original ChatGPT about code-writing abilities:

Can ChatGPT be used to write software?

I receive the same warning I've been seeing from the start:

No, ChatGPT is not designed to write software. It is designed to generate natural language responses to user input.

This response led me to believe that the developers at OpenAI had specifically planted this information.

image

Bing's version of ChatGPT has a completely different answer:

ChatGPT is a large language model chatbot developed by OpenAI based on GPT-3.5. It can interact in conversational dialogue form and provide responses that can appear surprisingly human. It can also write essays, summarize documents and write software.
However, ChatGPT does not have the ability to search the internet for information and it may not know what’s true or accurate. d It also may not be able to write high-quality code that meets your specific needs or standards.

That answer is, uhm, different than the one I received yesterday, which did not have caution about the quality of the code.

image

I DO Use This Tool... For me... it's been a great starting point...

I've seen some people say that they find it useful for finding libraries. I've tested this use numerous times and it's worse than hit or miss. PySimpleGUI was missing from lists of Python libraries sometimes. Given the data on the Internet, the websites that list "the best libraries for XXX", this doesn't surprise me. There are decades of these articles out there. Maybe start there for libraries, but I wouldn't trust it too much for anything that you want to be "timely" or "up to date".

If you're working with a specific library, that is mature, then it's a great place to start.

PySimpleGUI is not what I call a "mature library". It's ever-evolving and the techniques programmers used and capabilities PySimpleGUI had in 2018 are very different from those today. tkinter's mature as is much of the Python standard library. Be an intelligent user of the tool.

An Example From Yesterday...

I was working on a problem with Tabs and I use one of the calls to get the "currently active tab". I normally would go to 4 or 5 different tkinter reference sites and look up the calls for the Notebook widget.

One thing I like about Bing is the references it provides so you understand where the data originated and can check the source website if needed or discount the information if it's an old post. In this case, I learned about the notebook.index call. PySimpleGUI uses the notebook.select call. It was the answer I needed and could go look up more info about the call.

image

"Give me a hint"

My overall approach to these tools is to not use them in an absolute manner. They don't have THE answer. They've got some answers.... or maybe they don't. The problem I see is that the replies, unlike if you asked a friend, are given with complete confidence. A friend would at least tell you, "I'm no expert, but I've used the library once... maybe look at ....". Or "I don't know". At least a friend doesn't fabricate names of libraries that don't exist, ChatGPT said I wrote several that don't exist... complete fabrications, but stated as fact.

Be careful out there!
image

And keep building! I'm loving seeing what people are creating.

image

There are some amazing applications being built! Thank you for sharing them. image

@PySimpleGUI
Copy link
Owner

Out until Sunday....

I have some personal matters to attend to. I'm taking a rare weekend, somewhat off. I'll be back on Sunday for a bit. The Udemy coupon is expiring so that will get fixed up then. I'll also be out a few days early next week.

New Demos, New Features

There have been new Demo Programs released since the last announcement and a number of new features added to the GitHub release as well. Take a look at the Demo Programs section if you want a sneak peek before I write anything else about them.

Upcoming Releases

The majority of my time is spent on upcoming releases and new documentation that I've been writing about for months. I apologize that it's taking so long and that my time is split between support here and the work you've not yet seen. It makes the project look a bit like it's languishing, but I assure you it is not.

GitHub Dumped PayPal

The Sponsorship situation is particularly bad for open source across the board on GitHub now that PayPal was dropped. This project's sustainability I'll write about in the future but thought it worth mentioning since all open-source projects are struggling financially.

Thank You For The Kind and Supportive Messages

I really appreciate the comments in the GitHub issues. It's been what keeps me working on this project every day. Your gratitude is the fuel for the project.

Back on Sunday....

image

@PySimpleGUI
Copy link
Owner

Reminder - My attendance is spotty this week

As I mentioned in the comment above I will be unable to be fully present this week here with the project. Friday is the soonest I'll be back operating at 100%, or thereabouts.

Getting as much done this morning as I can before signing off. I'll try not to completely break things on the way out the door....

image

@PySimpleGUI
Copy link
Owner

New Mike Driscoll Book - The Python Quiz Book!

I'm excited that I received the latest Mike Driscoll book in the mail today.

P1080603

I like Mike's books on numerous levels. The style is right up my alley and stickers with his books, and now puzzles too?! FUN... and I like fun!

This one is really interesting and a little different than his others. I love it! It's clever. It can be a "I've got 3 minutes while waiting to pick up the kids so pull it out and give one of the quizzes a try" book.

The answers/hints to the quizzes include the location you will find the information in the Python documentation so you've got a place to go diving deeper if you want.

I start here with Mike's sites as he's got a lot going on now with his newer and growing TeachMePython.com site too:
https://www.blog.pythonlibrary.org/

Here's a page about the specific book:
https://www.blog.pythonlibrary.org/books/the-python-quiz-book/

Of anyone I've met in the Python community.... I've not met someone that's been in it for SOOO long, has written so much material and is also one of THE nicest persons I've encountered. His positive attitude permeates his books, his websites, and his Twitter account. So, for sure go check him out!

@PySimpleGUI
Copy link
Owner

Slowed Pace.....

As I mentioned a couple of weeks ago, there have been several personal issues that are pulling me away from the project. It's frustrating, to say the least, as the year-long work on the upcoming release is nearing completion. Several medical complications have also significantly impacted my ability to work. I'm sorry for any impact that may have on your project and for the impact on the pace of PySimpleGUI overall. I'm doing all I can to recover and look forward to getting back to working hard as I can on the project.

@PySimpleGUI
Copy link
Owner

Getting Back Up To Speed....

I'm feeling better and am able to work several hours a day again. @jason990420 has been a hero of this project, not just recently while I've been out, but for the past several years. He deserves a massive round of applause for his non-stop commitment to helping so many people here.

I'll be getting back into the issues this weekend. I'm still splitting time between the currently publicly released project and the much larger release on the way. We're getting closer by the day.

I again apologize for the absence. I love this project, the users, and have missed working on it.... so it's nice to finally be able to spend some focused time on it again! Hopefully will get to these new issues in the next 2 days.

Thank you everyone for the support. It means more than I can express in words.

image

@PySimpleGUI
Copy link
Owner

PySimpleGUI commented Apr 2, 2023

Launcher Code For Chat....

I've written plenty on the AI Chat tools. Like everyone is learning, it's new territory to be explored. There are plenty of wonderful uses of this technology and I like Bing's implementation, particularly since I get the underlying "sources". While it can "generate code", I think the shorter snippet the better.

I like my own "Launchers" written in PySimpleGUI that I leave running. I've got 40 or so programs running at all times that monitor weather where my friends live, my CPU usage, 2 different launchers so I click 1 button and something kicks off like a "Build", etc.

I wanted a button that would open Edget to the BingChat so that I didn't have to open Edge, click a saved link, etc. This line of PySimpleGUI code is all that's needed to launch Edge to the Bing Chat page... at least on my system:

sg.execute_command_subprocess(r'start', 'msedge','"https://www.bing.com/chat"')

LED Weather Widget

One of the Demo Programs has stopped functioning... the long-term weather that's located here:
https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_LED_Clock_Weather.py

You'll find it at the bottom of this image:
image

I found that the reason that it is no longer working can be found here:

https://darksky.net/dev

which has the message at the top:

image

Will have to get this one converted at some point... but not super important at the moment... just an FYI...

@PySimpleGUI
Copy link
Owner

New 3.0 Version of psgtest Released to PyPI

A lot of testing is required for the new release that's coming soon. Testing and stability have been an important part of PySimpleGUI releases since the initial release in July 2018. This release needs to be thoroughly tested on all releases of Python, from 3.6 through 3.12.

To aid in the testing, the psgtest utility was expanded to perform automated testing using multiple interpreters. The "Run Regression All Interpreters" button will test the selected programs on every interpreter you've configured in the settings.

A tip for using on your development machine

If you want to run stress tests while you continue to work on your computer then try making your test programs have no_titlebar=True. I've found that this has much lower impact on Windows as an icon is not created on the taskbar for these windows. Explorer seems to be much happier and run much smoother without having to create and destroy icons on the taskbar.

psgtest.3.0.mp4

@PySimpleGUI
Copy link
Owner

PySimpleGUI 5.0 Almost Done

For the past year I've been talking about splitting my time between the current version of PySimpleGUI and a larger release of PySimpleGUI that includes a rewrite of the documentation. We're getting close to completing this release.

I would like to share a bit of what's coming in this release. More details are coming as the release nears completion.

I'm sure you can understand the amount of testing that's involved in a large release of PySimpleGUI. There are multiple OS's, versions of Python, versions of tkinter, support on devices like the Raspberry Pi and online environments like Trinket. The stability of PySimpleGUI has and remains an extremely important part of the PySimpleGUI user experience. I don't like crashes and I'm sure our users don't like them either.

Backward Compatible

Of course, 5.0 is backward compatible with previous releases of PySimpleGUI.

Documentation

The docs have all been rewritten. The interface is greatly improved with a much better and more manageable table of contents with sections that expand and collapse.

All 4 ports now have an SDK call reference, which also means all 4 ports have a full set of Docstrings so that your IDE understands the PySimpleGUI interfaces, providing you better code completion and error checking.

The eCookbook is now a part of the documentation (a new tab). Rather than visiting the Trinket site, you're able to run PySimpleGUI code directly from the PySimpleGUI documentation. Not only does the eCookbook take advantage of this new capability, so does the main documentation.

Enhanced Security

Several companies have voiced concern about security and being able to verify that PySimpleGUI code is "authentic".

There is a self-check in the code that authenticates the code is a valid "signed" release every time you import PySimpleGUI. There are web-based tools that enable you to be absolutely certain the code has not been tampered with since the self-check code, while made tamper-resistant, could in theory be modified.

Simplified Pip Installs and Upgrades

We're restructuring the GitHub repos for the PySimpleGUI project and have been using a new installation and upgrade architecture that has been working well during development. You'll be able to use the built-in "Upgrade From GitHub" feature as you do today, as well as using pip by itself in a more standard way.

There are also a number of utilities included in 5.0 that help with installing PySimpleGUI as well as other Python packages. A utility to help you with releasing your own code using this design will be released with 5.0.

Intelligent Upgrade Service

It's been a challenge to synchronize PySimpleGUI releases with OS and tkinter releases, particularly on the Mac. To improve stability and user experience, we've developed an Intelligent Upgrade Service to inform users when there are releases of PySimpleGUI that fix a problem that may be unique to their combination of components.

This is important when someone upgrades their OS which causes a problem with tkinter and PySimpleGUI. We'll be able to detect when they have a known bad configuration and provide instructions for which version of PySimpleGUI will work best given their new environment.

New Features

There are a number of new features are in 5.0 that are not in the GitHub port. The User Settings API has been expanded so that it's better integrated with your layout. It makes working data that persists between runs. For example, a parameter was added to the Window object that will automatically save the last location you had your windows located and will open it to that location the next time you run the program.

Your Patience Has Been Fantastic

I really appreciate the patience everyone has shown while this development work has been happening. We've done our best to keep bug fixes and some enhancements being added while working on 5.0. It's been much easier with your help.

@PySimpleGUI
Copy link
Owner

4.60.5 Posting to PyPI this weekend. 5.0 In June or PySimpleGUI 5 Year Anniversary at the Latest

We're posting a dot-release to PyPI this weekend that addresses 2 Mac issues. Those 2 issues are:

  1. Input Element doesn't work for no-titlebar windows on MacOS 13.2.1
  2. Narrowed the Alpha Channel 0.99 fix for disappearing window to be only on tkinter 8.6.12. This removes the need for anyone to uncheck the setting in the Mac Control Panel

Release notes will be posted once we're done testing and have uploaded to PyPI.

5.0 is looking good for June. The 5-year anniversary since the initial release of PySimpleGUI is July 7th (I think that's the right day). I would like to be done prior to that date. It's exciting to be getting close, but still a lot to do so I'm sorry if I'm distracted while we're trying to get it all wrapped up.

@PySimpleGUI
Copy link
Owner

PySimpleGUI 5 is coming, soon, honest!

I apologize that the schedule for the PySimpleGUI 5 release keeps moving out. There are a lot of new, big additions to the project, such as a new website. That means more moving parts with a lot of new people that have come on board as a result. The added complexity of the release has meant more coordination and a longer release schedule.

We're getting quite close, but a bit further to go. I like products that are stable which means paying attention to the details and testing testing testing.

Thank you for being patient and supportive while we're working behind the scenes. I'm sure this large step forward will bring the quality of the PySimpleGUI experience up significantly as well as make the product more secure, something that's becoming a huge problem in all things software.

Thank you for being the best group of users I could have ever dreamed of serving.

image

@PySimpleGUI
Copy link
Owner

Custom Titlebar Windows and Grab Anywhere Windows Move Smoother

I checked in a change today that make the custom titlebar, grab anywhere and control+Left Mouse move smoother. @jason990420 gave me a hand with it. I'm trying to devote as much time to PySimpleGUI 5 as possible so there aren't as many features going into PySimpleGUI 4. I wanted to get this change out to everyone now and not wait for PySimpleGUI 5.

PySimpleGUI 5 Update

We're still working 7 days a week on the sweeping PySimpleGUI 5 release. The scope of this release is massive with every port of PySimpleGUI changing and every application released to date also changing. Every file is changing in some way.

psggpt

One new application part of the PySimpleGUI 5 release is psggpt. It enables you to query ChatGPT. If you request a short piece of code, you can run it from within the program. ChatGPT has improved over time, and while I wouldn't suggest using it for a lengthy piece of code, it does a fine job when you need help on 5 or 10 lines of code.

psggpt

Thank you for the Thank you's! image

I appreciate the gratitude I see from our users. It's been truly remarkable to experience. I get all warm and fuzzy when someone thanks Jason for his help.

Thank you for your patience while we've been in heads-down mode, working on PySimpleGUI 5.

I owe the world's biggest thank you to Jason image who is a miracle worker when it comes to providing support for PySimpleGUI... I'm in awe...and clearly, those getting help are in awe too.

@PySimpleGUI
Copy link
Owner

PSG 5 Is Getting Very Close....

It's been such a long long stretch of working on this release. We're getting super close.

Distributing PySimpleGUI Applications

Another application was completed to help with Distribution of PySimpleGUI programs. It will create the setup.py and folder structure you need to distribute your application on PyPI. You'll entire your log and PW, saved locally on your machine, and then click upload.

After this simple upload is completed, you can tell your colleagues, friends, or the world, that they can install your program (e.g. my_application) by typing:

python -m pip install my_application

Thank you for the encouragement and understanding

I see comments in issues telling me that it's clear you're all understanding the slowed pace of me working on PySimpleGUI 4 and it's so helpful to have your support.

Getting PySimpleGUI Listed As A Classifier

Uploading PySimpleGUI applications for distribution via PyPI is something the PySimpleGUI project has done for a while now and the experience is really nice. It feels tightly integrated into Python.

We would like PySimpleGUI to be listed as a Framework in the classifiers on PyPI. If you want to add your support in getting this change added, add a thumbs up to the pull request that was submitted. You only need to click the thumb emoji that's already there:

pypa/trove-classifiers#157

image

@PySimpleGUI
Copy link
Owner

PySimpleGUI Framework Added to PyPI Classifiers

Thank you to everyone that gave a thumbs-up to adding PySimpleGUI to the PyPI classifiers! With PySimpleGUI 5 we're providing tools and instructions to make using PyPI for PySimpleGUI application distribution easier.

You will find PySimpleGUI listed on the left side of the PyPI search page. At the moment, only psgresizer is marked using this classifier. For this search, I checked PySimpleGUI as a filter

https://pypi.org/search/?q=&o=&c=Framework+%3A%3A+PySimpleGUI

image

PyPI returned psgresizer as a match:

image

We're getting closer by the day to being done with PySimpleGUI 5 and releasing it.

@PySimpleGUI
Copy link
Owner

Targeting Pre-Christmas PySimpleGUI 5 Release...

We've been targeting to get PySimpleGUI 5 released before Chriastmas
image

It's become a PySimpleGUI tradition of sorts to release big things at the holidays. But, I also don't like releases that are not rock solid. PySimpleGUI 5 has been running rock solid for months as I've been making changes, but there's been changes all along the way, so the final testing isn't really valid until the a code FREEZE happens with no more changes. I thought I was there a couple times over the past weeks, but still not quite done done done.

I'm "hopeful" for pre-Christmas release, but I'm also not going to cram something out the door just to meet that somewhat arbitrary deadline. It's not fair to you, and it's not fair to the PySimpleGUI team. This is too important of a release to be casual about the quality. Another couple of weeks is not going to have a negative impact compared to releasing a product with problems 2 weeks earlier.

image

Hoping we make it!

THANK YOU everyone for being SO incredibly supportive over the many many months it's taken. Despite trying, I can't thank @jason990420 enough for providing the world's best product support, but I'm going to keep trying!

@PySimpleGUI
Copy link
Owner

Happy New Year's eve-eve

I hope everyone is having a great holiday season. PySimpleGUI 5 clearly didn't make it under the Christmas Tree this year. We are quite close and are feature & code complete. We didn't get through all of the testing and documentation updates in time to get the release out the door.

It's important we maintain the kind of quality our users are accustomed to, and rushing everything out the door without testing would not make for a great experience. We're not shooting for perfection by any means so there will be some rough spots. That's just how software development is.

Thank you so much for the patience during this really long development cycle.

-mike

@PySimpleGUI
Copy link
Owner

One more week.....

image

We're in the final stretch! The target, and I think it's a good target, is PySimpleGUI 5 ships in a week.

The testing is going very well and the proof reading and editing is also underway. We're working hard to make the experience with this release as solid as everyone is used to experiencing with PySimpleGUI over the past 5 years, and I have no doubt that everyone will be blown away by the documentation.

image

I appreciate the patience and support from everyone! The personal experience I've had with this project has been unlike any project I've been a part of... going back to the 1970's when I fell in love with programming. Thank you for truly making it "the dream come true I didn't know I had". image

@PySimpleGUI
Copy link
Owner

PySimpleGUI 5 Launch Progress & PySimpleGUI 4 Availability

I really appreciate the patience and support as we continue to roll out PySimpleGUI 5 and the associated applications!

While the GitHub PySimpleGUI repo has been reconfigured and changed from an open-source LGPL license to our commercial license, nothing has changed on PyPI regarding release availability.

100% of the previous releases of PySimpleGUI 4 that were available continue to be hosted on PyPI and available for access. You can pip install PySimpleGUI 4 with no restrictions. Sunsetting the previous open-source releases, as mentioned in the documentation, isn't scheduled until Q2 2024.

@PySimpleGUI
Copy link
Owner

PySimpleGUI 5 Debug Watermarking Feature

You may have noticed on some of the screenshots I have posted over the past few months that there is a watermark on many of them with version information and a security badge.

While testing PySimpleGUI 5 I needed to easily see what versions a test/program was running. PSG5 runs on Python 3.6 through 3.13, making testing a chore and debugging a challenge. Being able to glance at a window and see the versions and if the code is secure was very helpful. I thought it may be of help to others so I left the capability in the code and make it a feature.

Here's a simple popup window:

image

And the same code with the debug watermark enabled:

image

Across the bottom, you'll find:

  • PySimpleGUI Version number being run
  • tkinter version
  • Python version
  • Security badge - normally green, showing the code has not been tampered with

Enabling/Disabling

Global Settings Window

There are several ways to enable / disable the debug watermark. One is via the Global Settings window:

image

psgwatermarkoff and psgwatermarkoff Commands

You can also use the command line commands psgwatermarkon and psgwatermarkoff. Even using this technique, there are multiple ways of accomplishing it. One is to simply use the shell/command prompt

image

Windows Search Box

On windows, you can enter command line commands in the search-box on the taskbar. WindowsKey+S is a shortcut to get your cursor over there for typing

image

Shortcuts (for example pinned to the taskbar)

For PySimpleGUI programs or psg-commands that I use frequently, I pin them to my taskbar using the psgshortcut application. With this technique I created 2 shortcuts, each pointing to the corresponding EXE file for the command. Then I pinned each of these shortcuts to the taskbar.

image

Development Builds

The ability to easily get bug fixes and new features prior to them being officially released to PyPI has been a feature heavily used over the past 4 years. The same as before, a red button image is what you're looking for in the psgmain (Home) Window. psgupgrade will also launch the same upgrade procedure.

image

The first step of getting the development build is this confirmation window that shows you the version you're running and the version you're about to install.

image

New in PSG5 is the ability to see the "release notes" (i.e. changelog) showing the changes that are in the build since the last release to PyPI. You'll find this same information in a file named development_build_changelog.txt contained in the PySimpleGUI GitHub Repo

image

@PySimpleGUI
Copy link
Owner

The PySimpleGUI 5 Documentation

Be sure to check out the new documentation, located at https://Docs.PySimpleGUI.com !

We spent a lot of time completely reworking the documentation. Not only does it look, feel, and perform much better, but you can get everything in one place. The eCookbook was previously hosted on Trinket. Now it's integrated directly into the documentation.

https://docs.pysimplegui.com/en/latest/cookbook/ecookbook/

Trinket hasn't upgraded to PySimpleGUI 5 yet, but all of the eCookbook code runs just as it would using PSG5 so you should notice no difference.

The Call Reference was reworked considerably as well. Here's the page for the Button element in the tkinter port:

https://docs.pysimplegui.com/en/latest/call_reference/tkinter/classes/elements/button/

@PySimpleGUI
Copy link
Owner

Thank you!

Really appreciate the:

  • Patience
  • Hobbyists Registrations
  • Commercial Registrations
  • Support & understanding

Thank you to the 1,000's of you that registered for a PySimpleGUI 5 keys! It's great to see people signing up and using the new version.

While there have been a few problems with key input, it's less than .1% which is really great.

We're doing our best to be open, communicative and prompt. Thank you for the kind emails showing support for what we're doing!

@PySimpleGUI
Copy link
Owner

License Key Input

The documentation section that shows how to input your license key is located here:
https://docs.pysimplegui.com/en/latest/documentation/installing_licensing/license_keys/

When we run into issues where there's uncertainty, it's not clear, or more needs to be explained, we are adding to the FAQ and/or documentation so that we can point everyone that has an issue to the same place.

I'm also working on a new HOWTO section that shows videos of registering for a key and entering a key for example.

psgmain.registration.mp4

There are literally 1,000s of people successfully entering keys so in a broad sense, things are operational. BUT, this is software, and of course there may be bugs. Thank you again for your patience. We're working hard on it.

@PySimpleGUI
Copy link
Owner

Addition of PASTE Button for Keys

Software development is an iterative process is something I've known maybe more in the back of my head than something consciously thought about. Having a library that spans 8 versions of Python, 3 major operating systems, many development environments has been quite a unique experience and one I know I'll have to continue to iterate on into the future.

A lesson learned this past week has been on entering Keys.

Yesterday I added a clear and paste buttons to the Home Window. I'll be doing the same to other dialog windows where keys are entered. Here's how the Home Window turned out:

image

A Paste button removes the need for knowing the shortcut key for pasting a string. A Clear button wasn't a bad addition either.

Once I get these additions done and tested, I'll get them onto PyPI and into the documentation.

Software Can be SO Frustrating

image

When others struggle to set up a Zoom call or meeting or get something to work and tell me how stupid they feel, I'm quick to point out to them that I struggle just as much, make just as many errors. "It's not YOU, honest!"

If you're frustrated at the problems you're having, I get it for sure! I'm seeing a lot of patience shown in the messages I've received and the issues that are posted. I've got no great piece of wisdom here.... just wanting to say thank you to everyone for being patient and kind. I really appreciate it! Thank you for the help.... your support is very much helping.

Roll Into the Docs What's Learned

It hadn't occurred to me that some of the activities post-launch would be to quickly make adjustments to the documentation so that one person's report of not understanding is not just a single issue to solve on GitHub, but rather a hole in our documentation that needs quickly fixing so that others don't also become confused.

@PySimpleGUI
Copy link
Owner

PySimpleGUI 5 Applications Released

'########:::'######:::'######::::::'########:
 ##.... ##:'##... ##:'##... ##::::: ##.....::
 ##:::: ##: ##:::..:: ##:::..:::::: ##:::::::
 ########::. ######:: ##::'####:::: #######::
 ##.....::::..... ##: ##::: ##:::::...... ##:
 ##::::::::'##::: ##: ##::: ##:::::'##::: ##:
 ##::::::::. ######::. ######::::::. ######::
..::::::::::......::::......::::::::......:::
:::'###::::'########::'########:::'######::
::'## ##::: ##.... ##: ##.... ##:'##... ##:
:'##:. ##:: ##:::: ##: ##:::: ##: ##:::..::
'##:::. ##: ########:: ########::. ######::
 #########: ##.....::: ##.....::::..... ##:
 ##.... ##: ##:::::::: ##::::::::'##::: ##:
 ##:::: ##: ##:::::::: ##::::::::. ######::
..:::::..::..:::::::::..::::::::::......:::

It's taken a little while to get all of the new "PSG Applications" posted to GitHub and PyPI. These are the applications:

  • psgdemos - the demo programs and demo browser
  • psgresizer - image converter, resizer, and most importantly a Base64 encoder
  • psgtray - system tray icon for PySimpleGUI
  • psgfiglet - create figlets...I use them heavily for commenting my code and as a banner like above
  • psggadgets - these are called "Desktop Widgets" in the demo programs. This is a new app
  • psgshortcut - create shortcuts for window easily. A must for pinning programs to taskbar, etc.
  • psgyolo - the YOLO AI application that's been a part of PySimpleGUI for a long time
  • psgtest - test tool for regression testing and testing across multiple versions of python
  • psgcompiler - front-end for PyInstaller. This is how I make EXE files
  • psghotkey - a hotkey manager that runs in the system tray
  • psgreddit - reddit searcher/reader that shows how to use the praw module

More applications are in development such as a PyPI application uploader. It's working (I used it to upload all of the above to release at the moment.

Pip Installing the Applications

I'm trying something new with the applications. PyPI is the official home and the easiest place to install them from as the command is, for example:

python -m pip install --upgrade psgfiglet

To install directly from the GitHub repo, this is the command to use:

python -m pip install --upgrade https://github.com/PySimpleGUI/psgfiglet/zipball/main

It's been a great way to test the pip installs prior to uploading, but it is something new that I've not heavily studied image and may have problems I've not yet seen.

Again, thank you for your patience as this sprawling update continues to be rolled out. There are a lot of exciting additions that I'm looking forward to showing here. They're in the documentation, but there's a lot of documentation, and don't expect everyone to go through it all to find the fun new things in there.

@PySimpleGUI
Copy link
Owner

Trinket Updated to PySimpleGUI 5

We've worked closely with the fine folks at Trinket for years. This weekend they updated the version of PySimpleGUI used in Trinkets to the latest PyPI release. All of the Trinkets you see embedded in our documentation are now running PySimpleGUI 5, as do the exercises that are part of the Udemy course.

Here's an example of the "All Elements" Trinket that is embedded in the docs:

https://docs.pysimplegui.com/en/latest/documentation/module/elements/#pseudo-elements

image

eCookbook

The eCookbook is now integrated into the documentation:

https://docs.pysimplegui.com/en/latest/cookbook/ecookbook/

One of the big advantages to it being fully integrated, in addition to one-stop-documentation, is that your searches of the documentation also search the eCookbook.

@PySimpleGUI
Copy link
Owner

PySimpleGUI 5 Documentation Update

We've done a bit of reshuffling of the call reference. The tkinter call reference is here:
https://docs.pysimplegui.com/en/latest/call_reference/tkinter/

I'm really proud of the way the PSG5 documentation turned out. It's so much better than the previous version in numerous ways.

This change re-organized the table of contents. We also added to the Elements section. Elements are implemented using classes and some are implemented using simple functions. The Push Element and pre-defined buttons like Ok are examples of Elements that are implemented as functions.

image

Release 5.0.3

I'm posting 5.0.3 to PyPI later today. It has an important fix for licenses that contain what I'll call "special characters". A tooltips enhancement is also part of the release. You can see the contents of the latest development build from the Home Window and can also be found in this GitHub repo in the file:
https://github.com/PySimpleGUI/PySimpleGUI/blob/master/development_build_changelog.txt

You'll see that we're up to 5.0.2.11. To see the notes from the Home Window:

image

Click the red button image

This opens the upgrade window.

image

Click the "Show Release Notes" button and you'll see a window with the release notes:

image

New PSG 5 Features

Several new features were added that I'll be creating and releasing Demo Programs for.

Window Parms print_event_values and auto_save_location

A couple of new Window parameters

window = sg.Window('Window Title', layout, print_event_values=True, auto_save_location=True)

print_event_values set to True will cause the event and values variables to be printed for you when you read a window.. Timeout events are filtered out.

auto_save_location will cause your window to be opened in the location where it was last located.

setting Parm for Elements

This is a great feature for "settings" portions of your GUI. The value of the setting parameter indicates the Element will automatically save/load values between runs. The value of the setting parameter indicates the initial value you would like to start with. After a value is saved, it will no longer use the value of the parameter. Instead, the saved value is loaded.

To save the values, you'll make this call when you exit your program:

window.settings_save(values)

This will save the values of elements that have the setting parm.

It'll be much more clear with a Demo Program. Here's a short example using these new features:

import PySimpleGUI as sg

layout = [  [sg.Text('My Window')],
            [sg.Input(key='-IN-', setting='My initial value')],
            [sg.Checkbox('Checkbox', key='-CB-', setting=True)],
            [sg.Button('Go'), sg.Button('Exit')]  ]

window = sg.Window('Setting Example', layout, enable_close_attempted_event=True, print_event_values=True, auto_save_location=True)

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

window.close()

@PySimpleGUI
Copy link
Owner

Changes To Licensing Coming....

Thank you everyone that's sent email to ask questions and give feedback on the license model. It's been very helpful for us to hear your thoughts, questions, situations. As a result, we're making a couple of changes to the licensing that I personally like better, as a developer, and I believe a lot of you will like the changes too.

Thank you for the support, patience, understanding, encouragement, and kindness during this period of change and refinement. I'm going to keep doing my best every day to make PySimpleGUI a better library as I have since the launch in 2018. The goal, in all these changes, is to enable the library to continue into the future. I don't want for this to simply all end, and have the software be another project dies because it's not sustainable.

Can't wait to get the changes made and the information posted so stay tuned!

image

@PySimpleGUI
Copy link
Owner

Website Dashboard Problem

We've got a problem on the website displaying keys. We're aware of it and working on it.
image

Wanted everyone to be aware of it. Please be sure and hold onto the email sent to you with your key in case you need it in the future.

@PySimpleGUI
Copy link
Owner

Website Updates

The Dashboard problem was fixed yesterday.

Today we're having login issues. The site has been running very smoothly for the past month. We're working on the problem. I'm sorry for the inconvenience.

@PySimpleGUI
Copy link
Owner

License Changes Coming...

I'm not supposed to be announcing anything... but... I'm not so great at following instructions sometimes....

We're working hard on getting the changes made to the license. I'm quite sure everyone will like the change. There are a lot of places that need changing, there are lawyers that have to review documents, there are many more moving parts than before. So, turning on a dime, like I've been able to do in the past, is not as easy.

The Summary....

The word "Subscription" is going away... it's being replaced by the word "Perpetual"

That's all I can say right now, but hopefully that's enough to give a good idea of what we're doing....

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
All Ports All Ports announcements Announcements
Projects
None yet
Development

No branches or pull requests

16 participants