Skip to content

Commit 56015f3

Browse files
committed
Demo Program changes to go from PSG5 to PSG6 (commercial -> LGPL3)
1 parent 4890aff commit 56015f3

341 files changed

Lines changed: 340 additions & 2818 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DemoPrograms/Browser_START_HERE_Demo_Programs_Browser.py

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
'''
2-
Copyright 2022-2024 PySimpleSoft, Inc. and/or its licensors. All rights reserved.
2+
Copyright 2018-2026 PySimpleGUI. All rights reserved.
33
4-
Redistribution, modification, or any other use of PySimpleGUI or any portion thereof is subject
54
to the terms of the PySimpleGUI License Agreement available at https://eula.pysimplegui.com.
65
7-
You may not redistribute, modify or otherwise use PySimpleGUI or its contents except pursuant
86
to the PySimpleGUI License Agreement.
97
'''
108

@@ -14,7 +12,7 @@
1412
import warnings
1513
import PySimpleGUI as sg
1614

17-
version = '5.3.0'
15+
version = '6.0'
1816
__version__ = version.split()[0]
1917

2018

@@ -56,7 +54,7 @@
5654
5.2.0 14-Aug-2024 Fixed erronous import error (when import line started with "from")
5755
Added a new "Path" input so that an arbitrary file can be executed easily (or edited)
5856
5.3.0 15-Aug-2024 One last change for the new path input... clear other fields if chars are entered
59-
Copyright 2021, 2022, 2023, 2024 PySimpleSoft Inc.
57+
Copyright 2018-2026 PySinpleGUI. All rights reserved.
6058
"""
6159

6260
'''
@@ -95,7 +93,7 @@ def get_file_list_dict():
9593
fname_full = os.path.join(dirname, filename)
9694
if filename not in demo_files_dict.keys():
9795
demo_files_dict[filename] = fname_full
98-
else:
96+
else:
9997
# Allow up to 100 dupicated names. After that, give up
10098
for i in range(1, 100):
10199
new_filename = f'{filename}_{i}'
@@ -797,26 +795,7 @@ def pip_install_latest():
797795

798796
window.close()
799797

800-
def suggest_upgrade_gui():
801-
layout = [[sg.Image(sg.EMOJI_BASE64_HAPPY_GASP), sg.Text(f'PySimpleGUI 5+ Required', font='_ 15 bold')],
802-
[sg.Text(f'PySimpleGUI 5+ required for this program to function correctly.')],
803-
[sg.Text(f'You are running PySimpleGUI {sg.version}')],
804-
[sg.Text('Would you like to upgrade to the latest version of PySimpleGUI now?')],
805-
[sg.Push(), sg.Button('Upgrade', size=8, k='-UPGRADE-'), sg.Button('Cancel', size=8)]]
806798

807-
window = sg.Window(title=f'Newer version of PySimpleGUI required', layout=layout, font='_ 12')
808-
809-
while True:
810-
event, values = window.read()
811-
812-
if event in (sg.WIN_CLOSED, 'Cancel'):
813-
window.close()
814-
break
815-
elif event == '-UPGRADE-':
816-
window.close()
817-
pip_install_latest()
818-
sg.execute_command_subprocess(sys.executable, __file__, pipe_output=True, wait=False)
819-
break
820799

821800

822801
def make_str_pre_38(package):
@@ -862,11 +841,6 @@ def show_package_version(package):
862841

863842

864843

865-
def upgrade_check():
866-
if not sg.version.startswith('5'):
867-
suggest_upgrade_gui()
868-
exit()
869-
870844

871845

872846
'''
@@ -887,7 +861,6 @@ def main():
887861
"""
888862

889863
sg.user_settings_filename(filename='psgdemos.json')
890-
upgrade_check()
891864

892865
sg.user_settings_filename('psgdemos.json')
893866
sg.set_options(icon=sg.EMOJI_BASE64_HAPPY_IDEA)
@@ -972,7 +945,7 @@ def main():
972945
break
973946
except AttributeError:
974947
sg.cprint('Your version of PySimpleGUI needs to be upgraded to fully use the "WAIT" feature.', c='white on red')
975-
elif event.startswith('Edit Me'):
948+
elif event.startswith('Edit Me'):d
976949
editor_program = get_editor()
977950
sg.cprint(f'opening using {editor_program}:')
978951
sg.cprint(f'{__file__}', text_color='white', background_color='red', end='')

DemoPrograms/CONTRIBUTING.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

DemoPrograms/Demo_All_Elements.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
Displays the values dictionary entry for each element
1212
And more!
1313
14-
Copyright 2021-2023 PySimpleSoft, Inc. and/or its licensors. All rights reserved.
14+
Copyright 2018-2026 PySimpleGUI. All rights reserved.
1515
16-
Redistribution, modification, or any other use of PySimpleGUI or any portion thereof is subject to the terms of the PySimpleGUI License Agreement available at https://eula.pysimplegui.com.
1716
18-
You may not redistribute, modify or otherwise use PySimpleGUI or its contents except pursuant to the PySimpleGUI License Agreement.
1917
"""
2018

2119
import PySimpleGUI as sg

DemoPrograms/Demo_All_Elements_Simple.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
66
All elements shown in 1 window as simply as possible.
77
8-
Copyright 2022-2023 PySimpleSoft, Inc. and/or its licensors. All rights reserved.
8+
Copyright 2018-2026 PySimpleGUI. All rights reserved.
99
10-
Redistribution, modification, or any other use of PySimpleGUI or any portion thereof is subject to the terms of the PySimpleGUI License Agreement available at https://eula.pysimplegui.com.
1110
12-
You may not redistribute, modify or otherwise use PySimpleGUI or its contents except pursuant to the PySimpleGUI License Agreement.
1311
"""
1412

1513

DemoPrograms/Demo_Animated_GIFs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
The remaining images are shown 1 at a time. To move on to the next image, click the current image.
1313
If you want to exit before reaching the final image, right click the image and choose 'exit'
1414
15-
Copyright 2022-2023 PySimpleSoft, Inc. and/or its licensors. All rights reserved.
15+
Copyright 2018-2026 PySimpleGUI. All rights reserved.
1616
17-
Redistribution, modification, or any other use of PySimpleGUI or any portion thereof is subject to the terms of the PySimpleGUI License Agreement available at https://eula.pysimplegui.com.
1817
19-
You may not redistribute, modify or otherwise use PySimpleGUI or its contents except pursuant to the PySimpleGUI License Agreement.
2018
"""
2119

2220
# ---------------------------- Base 64 GIFs ----------------------------

DemoPrograms/Demo_Animated_GIFs_Using_PIL.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
this is one possible technique.
1212
1313
This particular demo will loop playing the GIF file over and over. To not loop, remove the while True statement.
14-
Copyright 2020-2023 PySimpleSoft, Inc. and/or its licensors. All rights reserved.
14+
Copyright 2018-2026 PySimpleGUI. All rights reserved.
1515
16-
Redistribution, modification, or any other use of PySimpleGUI or any portion thereof is subject to the terms of the PySimpleGUI License Agreement available at https://eula.pysimplegui.com.
1716
18-
You may not redistribute, modify or otherwise use PySimpleGUI or its contents except pursuant to the PySimpleGUI License Agreement.
1917
"""
2018

2119
gif_filename = r'ExampleGIF.gif'

DemoPrograms/Demo_Auto_Save_Window_Position.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
There is one added line of code. When the user attempts to close the window, that's when the position is saved.
1212
When the program starts, it reads the previously saved position as part of the window creation. User Settings APIs rock!
1313
14-
Copyright 2021-2023 PySimpleSoft, Inc. and/or its licensors. All rights reserved.
14+
Copyright 2018-2026 PySimpleGUI. All rights reserved.
1515
16-
Redistribution, modification, or any other use of PySimpleGUI or any portion thereof is subject to the terms of the PySimpleGUI License Agreement available at https://eula.pysimplegui.com.
1716
18-
You may not redistribute, modify or otherwise use PySimpleGUI or its contents except pursuant to the PySimpleGUI License Agreement.
1917
"""
2018

2119
layout = [[sg.Text('Window that Auto-saves position', font='_ 25')],

DemoPrograms/Demo_Bar_Chart.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313
To make things a little more interesting, this is a barchart with that data values
1414
placed as labels atop each bar, another Graph element method (draw_text)
1515
16-
Copyright 2022-2023 PySimpleSoft, Inc. and/or its licensors. All rights reserved.
16+
Copyright 2018-2026 PySimpleGUI. All rights reserved.
1717
18-
Redistribution, modification, or any other use of PySimpleGUI or any portion thereof is subject to the terms of the PySimpleGUI License Agreement available at https://eula.pysimplegui.com.
1918
20-
You may not redistribute, modify or otherwise use PySimpleGUI or its contents except pursuant to the PySimpleGUI License Agreement.
2119
"""
2220

2321

DemoPrograms/Demo_Base64_Image_Encoder.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
input: folder with .png .ico .gif 's
99
output: output.py file with variables
1010
11-
Copyright 2023 PySimpleSoft, Inc. and/or its licensors. All rights reserved.
11+
Copyright 2018-2026 PySimpleGUI. All rights reserved.
1212
13-
Redistribution, modification, or any other use of PySimpleGUI or any portion thereof is subject to the terms of the PySimpleGUI License Agreement available at https://eula.pysimplegui.com.
1413
15-
You may not redistribute, modify or otherwise use PySimpleGUI or its contents except pursuant to the PySimpleGUI License Agreement.
1614
'''
1715

1816
def main():

DemoPrograms/Demo_Base64_Single_Image_Encoder.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@
1919
Input: a single image file
2020
Output: clipboard will contain the Base64 Byte String of the source image
2121
22-
Copyright 2021-2023 PySimpleSoft, Inc. and/or its licensors. All rights reserved.
22+
Copyright 2018-2026 PySimpleGUI. All rights reserved.
2323
24-
Redistribution, modification, or any other use of PySimpleGUI or any portion thereof is subject to the terms of the PySimpleGUI License Agreement available at https://eula.pysimplegui.com.
2524
26-
You may not redistribute, modify or otherwise use PySimpleGUI or its contents except pursuant to the PySimpleGUI License Agreement.
2725
"""
2826

2927

0 commit comments

Comments
 (0)