diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..0d20b6487
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.pyc
diff --git a/DemoPrograms/Browser_START_HERE_Demo_Programs_Browser.py b/DemoPrograms/Browser_START_HERE_Demo_Programs_Browser.py
index 77cb39ac4..dc4bd6f41 100644
--- a/DemoPrograms/Browser_START_HERE_Demo_Programs_Browser.py
+++ b/DemoPrograms/Browser_START_HERE_Demo_Programs_Browser.py
@@ -1,9 +1,7 @@
'''
Copyright 2018-2026 PySimpleGUI. All rights reserved.
-to the terms of the PySimpleGUI License Agreement available at https://eula.pysimplegui.com.
-
-to the PySimpleGUI License Agreement.
+ Licensed under LGPL3
'''
import os
@@ -12,7 +10,7 @@
import warnings
import PySimpleGUI as sg
-version = '6.0'
+version = '6.0.1'
__version__ = version.split()[0]
@@ -54,6 +52,9 @@
5.2.0 14-Aug-2024 Fixed erronous import error (when import line started with "from")
Added a new "Path" input so that an arbitrary file can be executed easily (or edited)
5.3.0 15-Aug-2024 One last change for the new path input... clear other fields if chars are entered
+ 6.0 8-Apr-2026 Major version bump to match the commercial to LGPL3 license change
+ 6.0.1 9-Apr-2026 Set the likely location of the demo programs as the initial path in the settings window
+
Copyright 2018-2026 PySinpleGUI. All rights reserved.
"""
@@ -232,7 +233,7 @@ def get_line_number(file_path, string, dupe_lines):
if string.strip() == line.strip() and num not in dupe_lines:
lmn = num
return lmn
-
+
def kill_ascii(s):
return "".join([x if ord(x) < 128 else '?' for x in s])
@@ -504,7 +505,7 @@ def find_in_file(string, demo_files_dict, regex=False, verbose=False, window=Non
list_of_matches.append(_match.strip())
file_array_old.append(file_array_new)
file_array_old.append(file_match_list)
-
+
if tail in file_lines_dict:
for i in range(1, 100):
new_tail = f'{tail}_{i}'
@@ -591,10 +592,13 @@ def settings_window():
except:
global_theme = ''
+ # normally the demo programs are located in a folder in the same folder as the demo browser
+ default_demo_programs_path = os.path.join(os.path.dirname(__file__), 'demo_programs')
+
layout = [[sg.T('Program Settings', font='DEFAULT 25')],
[sg.T('Path to Tree', font='_ 16')],
- [sg.Combo(sorted(sg.user_settings_get_entry('-folder names-', [])), default_value=sg.user_settings_get_entry('-demos folder-', get_demo_path()), size=(50, 1), key='-FOLDERNAME-'),
- sg.FolderBrowse('Folder Browse', target='-FOLDERNAME-'), sg.B('Clear History')],
+ [sg.Combo(sorted(sg.user_settings_get_entry('-folder names-', [])), default_value=sg.user_settings_get_entry('-demos folder-', get_demo_path()), size=(50, 1), auto_size_text=False, key='-FOLDERNAME-'),
+ sg.FolderBrowse('Folder Browse', target='-FOLDERNAME-', initial_folder=default_demo_programs_path), sg.B('Clear History')],
[sg.T('Editor Program', font='_ 16')],
[sg.T('Leave blank to use global default'), sg.T(global_editor)],
[ sg.In(sg.user_settings_get_entry('-editor program-', ''),k='-EDITOR PROGRAM-'), sg.FileBrowse()],
diff --git a/PySimpleGUI/CONTRIBUTING.md b/PySimpleGUI/CONTRIBUTING.md
new file mode 100644
index 000000000..cc30e198a
--- /dev/null
+++ b/PySimpleGUI/CONTRIBUTING.md
@@ -0,0 +1,7 @@
+## Contributing to PySimpleGUI
+
+We are happy to receive issues describing bug reports and feature requests! If your bug report relates to a security vulnerability, please do not file a public issue, and please instead reach out to us at issues@PySimpleGUI.com.
+
+We do not accept (and do not wish to receive) contributions of user-created or third-party code, including patches, pull requests, or code snippets incorporated into submitted issues. Please do not send us any such code! Bug reports and feature requests should not include any source code.
+
+If you nonetheless submit any user-created or third-party code to us, (1) you assign to us all rights and title in or relating to the code; and (2) to the extent any such assignment is not fully effective, you hereby grant to us a royalty-free, perpetual, irrevocable, worldwide, unlimited, sublicensable, transferrable license under all intellectual property rights embodied therein or relating thereto, to exploit the code in any manner we choose, including to incorporate the code into PySimpleGUI and to redistribute it under any terms at our discretion.
diff --git a/PySimpleGUI/LICENSE.txt b/PySimpleGUI/LICENSE.txt
new file mode 100644
index 000000000..153d416dc
--- /dev/null
+++ b/PySimpleGUI/LICENSE.txt
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
\ No newline at end of file
diff --git a/PySimpleGUI/PySimpleGUI.py b/PySimpleGUI/PySimpleGUI.py
index 5c11f59cf..e3f2991e0 100644
--- a/PySimpleGUI/PySimpleGUI.py
+++ b/PySimpleGUI/PySimpleGUI.py
@@ -54,7 +54,7 @@
"""
-version = "6.0"
+version = "6.0.2"
@@ -62,7 +62,10 @@
Changelog since last major release
6.0 5-Apr-2026 Initial release
-
+6.0.1 8-Apr-2026 Emoji change to main window
+6.0.2 8-May-2026 Fixed buh in Window.settings_save. If a window is closed using "X" or terminated in a
+ similiar way, then the value None is written to the settings file for all keys.
+ The fix is to check if all values are None. If so, skip saving the values
"""
@@ -11095,12 +11098,17 @@ def _build_element_list_for_form(self, top_window, window, elem_list):
def settings_save(self, values):
"""
Saves settings to settings file using the values dictionary that is passed in.
-
+ If all of the values in the dictionary are None, then it will not be saved
:param values: Dictionary of values to potentially save
:type values: (Dict)
"""
if values is None: # sometimes users may accidently pass in None, so just ignore it
return
+ # if all values in the value dictionary are None, then assume the windows was closed
+ # and no values should be saved
+ if all(v is None for v in values.values()):
+ return
+
for key, value in values.items():
try:
element = self.find_element(key)
@@ -25275,7 +25283,7 @@ def _create_main_window():
def VerLine(version, description, justification='r', size=(40, 1)):
return [T(version, justification=justification, font='Any 10', text_color='yellow', size=size, pad=(0, 0)), T(description, font='Any 10', pad=(0, 0))]
- security_emoji = EMOJI_BASE64_HAPPY_WINK
+ security_emoji = _random_happy_emoji()
diff --git a/PySimpleGUI/README.md b/PySimpleGUI/README.md
new file mode 100644
index 000000000..70687fbb4
--- /dev/null
+++ b/PySimpleGUI/README.md
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+# PySimpleGUI 6
+
+6-Apr-2026
+
+**Wait, what?**
+
+
+
+
+
+
+
+
+As we've been winding down the commercialization effort, shutting down servers and archiving materials, I saw this week that the PySimpleGUI repositories are going to be of little use. Everything was switched over to using PySimpleGUI 5. The documentation is PySimpleGUI5 specific as well. So, I made a decision a couple of days ago to get the project into a state where it's at least usable and hopefully even useful.
+
+## Version 4 on PyPI 4.60.5.0
+
+A first step was to put version 4.60.5 up on PyPI. Version 4.60.5.0 was posted this week so that `pip install PySimpleGUI` will provide a version of PySimpleGUI that's solid.
+
+## PySimpleGUI 6 - Back to LGPL3
+
+There were several years of development that went into the PySimpleGUI 5 effort. Rather than have those bug fixes and new features languish and be useless, I'm releasing them as Open Source.
+
+Not all of the Version 5 code is in 6. Things like the upgrade mechanism and of course the licensing has been removed. As far as functionality, it matches the SDK posted in the [Docs.PySimpleGUI.com](https://Docs.PySimpleGUI.com) documentation.
+
+## What to expect ahead
+
+### Applications, Demo Programs, etc
+
+The applications `psgdemos`, `psgfiglet`, `psghotkey` have all been upgraded to 6 and posted on GitHub and PyPI. The remaining applications are being updated as well.
+
+### Version 6 Uploaded to PyPI
+
+On Tues 14-Apr-2026 PSG Version 6 was posted to PyPI. There were a LOT of changes that have been made over the years since version 4 was released. Hoping that it all goes well! Feel free to open an issue if you run into trouble.
+
+
+
+
+
+
+
+### Maintenance & Support
+
+I don't have a firm grasp of the future beyond a few weeks at this point. If the past 8 years is any indication, I'm not very good at making predictions.
+
+## Installing
+
+You can install the latest released version from PyPI with a simple:
+
+## PyPI
+
+`python -m pip install PySimpleGUI`
+
+## Github
+
+You can install the latest version straight from the PySimpleGUI GitHub repo without downloading the repo by running:
+
+`python -m pip install --upgrade https://github.com/PySimpleGUI/PySimpleGUI/zipball/master`
+
+If you want to download the repo then download/close and run in the downloaded folder:
+
+`python -m pip install .`
+
+## More updates coming...
+
+Changes are rolling out onto GitHub and PyPI every few days. They'll continue until everything gets switched over to Version 6.
diff --git a/README.md b/README.md
index cbdb95382..03452944e 100644
--- a/README.md
+++ b/README.md
@@ -1,56 +1,141 @@
-
-
+
+
+
+
-
+
+# Open Source Once Again...
-# PySimpleGUI 6
+Hey, it's Mike....
-6-Apr-2026
-Wait, what?
+We gave commercialization a try. It was an incredible experience, but it didn’t generate the resources needed to sustain PySimpleGUI at the level we had hoped. In February 2025, we announced that PySimpleSoft would be shutting down, with support continuing through the end of 2025.
-As we've been winding down the commercialization effort, shutting down servers and archiving materials, I saw this week that the PySimpleGUI repositories are going to be of little use. Everything was switched over to using PySimpleGUI 5. The documentation is PySimpleGUI5 specific as well. So, I made a decision a couple of days ago to get the project into a state where it's at least usable and hopefully even useful.
+That process is now complete. The next question was what to do with the code, documentation, and repositories. I always planned to keep the repos available for reference—so the decision came down to the software itself.
-## Version 4 on PyPI
-A first step was to put version 4.60.5 up on PyPI. Version 4.60.5.0 was posted this week so that `pip install PySimpleGUI` will provide a version of PySimpleGUI that's solid.
-## PySimpleGUI 6 - Back to LGPL3
+# PySimpleGUI 6
-There were several years of development that went into the PySimpleGUI 5 effort. Rather than have those bug fixes and new features languish and be useless, I'm releasing them as Open Source.
+
+

+
-Not all of the Version 5 code is in 6. Things like the upgrade mechanism and of course the licensing has been removed. As far as functionality, it matches the SDK posted in the [Docs.PySimpleGUI.com](https://Docs.PySimpleGUI.com) documentation.
-## What to expect ahead
+I’ve released the PySimpleGUI 5 code as open source. After removing licensing and security components, it’s now available under the LGPL3 license on GitHub and PyPI.
-### Applications, Demo Programs, etc
+## Installing from PyPI
-These all need to be modified to remove the commercial license and checks for version 5. It shouldn't take too long to get them all changed. In the meantime, everything is usable with minor edits.
+To install the latest version (v6):
-### Upload to PyPI
+`python -m pip install PySimpleGUI`
-I'm hoping to get PSG6 up to PyPI in the next week. I first would like to get some runtime on it with installs happening from GitHub. When it is uploaded, because it's version 6, anyone pip installing will get it by default, so that quality needs to be checked first.
+If you need the older version (4.60.5.1):
-### Maintenance & Support
+`python -m pip install PySimpleGUI==4.60.5.1`
-I don't have a firm grasp of the future beyond a few weeks at this point. If the past 8 years is any indication, I'm not very good at making predictions.
+## Installing from Github
+The GitHub repo has the most up-to-date code. You can install directly without cloning:
-## Installing
-You can pip install straight from this Repo using the command:
-`python -m pip install git+https://github.com/PySimpleGUI/PySimpleGUI`
+`python -m pip install --upgrade https://github.com/PySimpleGUI/PySimpleGUI/zipball/master`
-or if you invoke Python using `python3`:
-`python3 -m pip install git+https://github.com/PySimpleGUI/PySimpleGUI`
+Or clone/download the repo and install locally:
-You can also download/clone the repo and run
`python -m pip install .`
+
+## Longer Term Outlook
+
+I’m still wrapping up the transition from version 5 to 6, including the docs. After that, I’m honestly not sure what the long-term future looks like—but if the past 8 years are any indication, I’m not great at predicting it.
+
+
+For now, I’m here and happy to help.
+
+## Thank you
+
+PySimpleGUI has been a once-in-a-lifetime experience. It’s been amazing to see what people have built and to be a small part of it. Thanks to everyone who supported the project over the years.
+
+---------------------------------
+
+
+# What is PySimpleGUI?
+
+PySimpleGUI is a wrapper for tkinter (and other GUI libraries) that transforms the GUI SDK into a simpler, more compact architecture while still providing detailed customization. No prior GUI programming experience needed.
+
+This is an entire interactive application.
+
+```python
+import PySimpleGUI as sg
+
+# Define the window's contents
+layout = [[sg.Text("What's your name?")],
+ [sg.Input(key='-INPUT-')],
+ [sg.Text(size=(40,1), key='-OUTPUT-')],
+ [sg.Button('Ok'), sg.Button('Quit')]]
+
+# Create the window
+window = sg.Window('Window Title', layout)
+
+# Display and interact with the Window using an Event Loop
+while True:
+ event, values = window.read()
+ # See if user wants to quit or window was closed
+ if event == sg.WINDOW_CLOSED or event == 'Quit':
+ break
+ # Output a message to the window
+ window['-OUTPUT-'].update('Hello ' + values['-INPUT-'] + "! Thanks for trying PySimpleGUI")
+
+# Finish up by removing from the screen
+window.close()
+```
+
+This is the window that's created.
+
+
+
+Here's the same window after some user interaction.
+
+
+
+## Documentation - want to learn more?
+
+
+You'll find **extensive** documentation at:
+
+https://Docs.PySimpleGUI.com
+
+## Contributing
+
+PySimpleGUI has always been developed more like a proprietary product than an open source project. Pull requests aren't accepted.
+
+## AI....
+
+
+
+Seems most projects have something to say about AI usage now. This is my **opinion** and how I've decided to use AI. It's what's right for me. It might not be right for you or anyone else.
+
+I use LLMs to search and summarize documentation, lookup errors, do research, get knowledge. I don't use LLMs to write code. My reason is very simple.
+
+### **I like to write code.**
+
+I fell in love with programming 50 years ago. Writing software is my happy place. Why would I give that to a computer to do instead of getting the enjoyment I get from doing it? AI can generate lots of things. The feeling I get writing software is not one of the things AI can generate.
+
+I'm not in a hurry. If I wanted code written for me, I would have opened the project up to pull requests years ago, but I didn't because I wanted to write the code. It's fun!
+
+### PySimpleGUI in the AI era
+
+A common question in software today is whether a library is still relevant. The answer is yes, people discover and install PySimpleGUI every day. GUI applications are often built incrementally. As features are added, layouts change, buttons move, and the code needs to evolve. That’s much easier when the code is understandable, whether it was written by a person or an AI initially.
+
+I use PySimpleGUI regularly, and I can’t imagine building a Windows app without it.I’ve recently been working on a 6502 breadboard computer, and I built a bus analyzer using a couple of Raspberry Pi Picos and a PySimpleGUI app to control everything from Windows.
+
+That’s reason enough for me to keep working to clean up the ecosystem and keep it running well.
-## More updates coming...
+## License & Copyright
-I'll post regular updates as progress is made. It should progress pretty quickly.
+Copyright 2018-2026 PySimpleGUI. All rights reserved.
+Licensed under LGPL3.
diff --git a/setup.py b/setup.py
index 66aad2369..6af9a31b4 100644
--- a/setup.py
+++ b/setup.py
@@ -10,8 +10,8 @@ def readme():
setuptools.setup(
- name="PySimpleGUI",
- version="6.0",
+ name="pysimplegui",
+ version="6.0.2",
author="PySimpleGUI",
author_email="PySimpleGUI@PySimpleGUI.org",
description="Python GUIs for Humans. Launched in 2018. NEW LGPL3 Version 6 released in 2026.",
@@ -27,7 +27,7 @@ def readme():
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
- "Framework :: PySimpleGUI"
+ "Framework :: PySimpleGUI",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",