More error handling for user_settings APIs. Re-arranged test GUI so that the popups tests are in their own tab. Added "Buy me a coffee" button, docstring updates for user settings.
This commit is contained in:
parent
3722a09863
commit
ac3847a23d
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/python3
|
||||
version = __version__ = "4.29.0.16 Unreleased\nAdded shink parameter to pin, added variable Window.maximized, added main_sdk_help_window function, theme DarkGrey10 added, no longer setting highlight thickness to 0 for buttons so that focus can be seen, new themes DarkGrey11 DarkGrey12 DarkGrey13 DarkGrey14, new user_settings APIs, added text parameter to Radio.update, echo_stdout_stderr parm added to Multiline and Output elements, added DarkBrown7 theme, user settings delete function, ver shortened version string, modal docstring fix in some popups, image parameter implemented in popup_scrolled, added Radio background & text colors to update, removed pad parms from DrawImage, added user_settings_file_exists, fixed blank entry with main program's theme previewer, added Python theme, added Window.set_min_size"
|
||||
version = __version__ = "4.29.0.17 Unreleased\nAdded shink parameter to pin, added variable Window.maximized, added main_sdk_help_window function, theme DarkGrey10 added, no longer setting highlight thickness to 0 for buttons so that focus can be seen, new themes DarkGrey11 DarkGrey12 DarkGrey13 DarkGrey14, new user_settings APIs, added text parameter to Radio.update, echo_stdout_stderr parm added to Multiline and Output elements, added DarkBrown7 theme, user settings delete function, ver shortened version string, modal docstring fix in some popups, image parameter implemented in popup_scrolled, added Radio background & text colors to update, removed pad parms from DrawImage, added user_settings_file_exists, fixed blank entry with main program's theme previewer, added Python theme, added Window.set_min_size, error message function for soft errors"
|
||||
|
||||
# The shortened version of version
|
||||
try:
|
||||
|
@ -16897,6 +16897,54 @@ def shell_with_animation(command, args=None, image_source=DEFAULT_BASE64_LOADING
|
|||
return output
|
||||
|
||||
|
||||
#######################################################################
|
||||
# 8888888888
|
||||
# 888
|
||||
# 888
|
||||
# 8888888 888d888 888d888 .d88b. 888d888
|
||||
# 888 888P" 888P" d88""88b 888P"
|
||||
# 888 888 888 888 888 888
|
||||
# 888 888 888 Y88..88P 888
|
||||
# 8888888888 888 888 "Y88P" 888
|
||||
#
|
||||
#
|
||||
#
|
||||
# 888b d888
|
||||
# 8888b d8888
|
||||
# 88888b.d88888
|
||||
# 888Y88888P888 .d88b. .d8888b .d8888b 8888b. .d88b. .d88b.
|
||||
# 888 Y888P 888 d8P Y8b 88K 88K "88b d88P"88b d8P Y8b
|
||||
# 888 Y8P 888 88888888 "Y8888b. "Y8888b. .d888888 888 888 88888888
|
||||
# 888 " 888 Y8b. X88 X88 888 888 Y88b 888 Y8b.
|
||||
# 888 888 "Y8888 88888P' 88888P' "Y888888 "Y88888 "Y8888
|
||||
# 888
|
||||
# Y8b d88P
|
||||
# "Y88P"
|
||||
# Code to make messages to help user find errors in their code
|
||||
#######################################################################
|
||||
|
||||
def _create_error_message():
|
||||
"""
|
||||
Creates an error message containing the filename and line number of the users
|
||||
code that made the call into PySimpleGUI
|
||||
:return: Error string to display with file, line number, and line of code
|
||||
:rtype: str
|
||||
"""
|
||||
|
||||
called_func = inspect.stack()[1].function
|
||||
trace_details = traceback.format_stack()
|
||||
error_message = ''
|
||||
file_info_pysimplegui = trace_details[-1].split(",")[0]
|
||||
for line in reversed(trace_details):
|
||||
if line.split(",")[0] != file_info_pysimplegui:
|
||||
error_message = line
|
||||
break
|
||||
if error_message != '':
|
||||
error_parts = error_message.split(', ')
|
||||
if len(error_parts) < 4:
|
||||
error_message = error_parts[0] + '\n' + error_parts[1] + '\n' + ''.join(error_parts[2:])
|
||||
return 'The PySimpleGUI internal reporting function is ' + called_func + '\n' + \
|
||||
'The error originated from:\n' + error_message
|
||||
|
||||
|
||||
# .d8888b. 888 888 d8b
|
||||
|
@ -16964,13 +17012,15 @@ class _UserSettings:
|
|||
with open(self.full_filename, 'w') as f:
|
||||
json.dump(self.dict, f)
|
||||
except Exception as e:
|
||||
print('Error saving settings to file:', self.full_filename, e)
|
||||
print('*** Error saving settings to file:***\n', self.full_filename, e)
|
||||
print(_create_error_message())
|
||||
|
||||
def delete_file(self):
|
||||
try:
|
||||
os.remove(self.full_filename)
|
||||
except Exception as e:
|
||||
print('User settings delete filename warning', e)
|
||||
print('*** User settings delete filename warning ***\n', e)
|
||||
print(_create_error_message())
|
||||
|
||||
def read(self):
|
||||
if self.full_filename is None:
|
||||
|
@ -16980,7 +17030,9 @@ class _UserSettings:
|
|||
with open(self.full_filename, 'r') as f:
|
||||
self.dict = json.load(f)
|
||||
except Exception as e:
|
||||
print('Error reading settings from file:', self.full_filename, e)
|
||||
print('*** Error reading settings from file: ***\n', self.full_filename, e)
|
||||
print(_create_error_message())
|
||||
|
||||
return self.dict
|
||||
|
||||
def exists(self, filename=None, path=None):
|
||||
|
@ -16994,8 +17046,6 @@ class _UserSettings:
|
|||
_UserSettings.settings = _UserSettings()
|
||||
|
||||
|
||||
|
||||
|
||||
def user_settings_filename(filename=None, path=None):
|
||||
"""
|
||||
Sets the filename and path for your settings file. Either paramter can be optional.
|
||||
|
@ -17077,7 +17127,9 @@ def user_settings_delete_entry(key):
|
|||
if key in settings.dict:
|
||||
del settings.dict[key]
|
||||
settings.save()
|
||||
|
||||
else:
|
||||
print('*** Warning - key ', key, ' not found in settings ***\n')
|
||||
print(_create_error_message())
|
||||
|
||||
def user_settings_get_entry(key, default=None):
|
||||
"""
|
||||
|
@ -17091,7 +17143,8 @@ def user_settings_get_entry(key, default=None):
|
|||
:type key: (Any)
|
||||
:param default: Value to use should the key not be found in the dictionary
|
||||
:type default: (Any)
|
||||
:return:
|
||||
:return: Value of specified settings
|
||||
:rtype: (Any)
|
||||
"""
|
||||
settings = _UserSettings.settings
|
||||
if settings.full_filename is None:
|
||||
|
@ -17765,6 +17818,7 @@ ICON_BASE64_THINK = b'iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAA
|
|||
|
||||
ICON_BASE64_PALM = b'iVBORw0KGgoAAAANSUhEUgAAAEkAAAA8CAMAAAAdQmecAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAAB8SDx4UEiAUDyAUEiMZFSUbGSsUEy8aFiwbGTsUFTkdICwiHTIjHDQrHzsiGysjIjIlIDMqIzMsKjsgIzotID0uKT01IzszMUkYHE0ZIFkbKEQhHkUqH0sgHUUgI0MtIkUoKEsmIEwqIkwqL00rM0I1I0s1JEswKE04J0w7LUc9OVYpJ1omMVM0JVQ1K1I4JVU7KlszK1k6J1s7KVw4NGEdLmQeMWghNmE5LWQ4NXIiPWs2RHkkQnAzRVRENVNDOF1ENFxEOVpKOWNDM2NHPWNMPGxFOWxKPG9QPnJKPHVQP05HRFJMSltUUWpLQ2lUQ2NcWndNQndIU3JUQ3JUSHRZTHxSRHxVSHxZSnlaVH1YYmZgX39gVmZjYnZran14doFURoNWSYNbTYNeUoleUItbaYRgT4VhU4JiWIVoXIpjVIxlWo1oVo1pWpFiVpFlWZJsXZRxX4JmZYVsY4trY4pzaoN9e5NtYpRtaJltY5ZxYpRyaZpzZZx1ap14a5N4eJx1cJp3eJ15cZp6eqB2a6J6baN8cqJ7eax9cah+epx7hImBf5uBeqWAdKOCe6qCdKqDequJfbKJfY2EgpmIiZqVk52Zk6SBhKaFiKyDgqqFiayJgqyNi6aLkayNlKGQi6uRja+QlqySm6qZlLKMhLKOi7SRi76Th7qTi7KTk7KVm7KYk7SZm7iWk7yZk7ucm7Sco7ScqbqeorOfsK2knrmhnKukoqyop7GrqrqhpLqlq7mup7urqrSosbKuubqjsrymubyps7qqub6xrbSxsLizvbe1wr68ycKYi8OcmsCmo8KmqcGup8Ooq8qqqcersMGvv8yutMKxu8uwtM2zusy+v9G3usCwwsS0yca8xsW7y82/x8m9ysm90Ne8wMjAvMPCxsLAyc3Ax8vAy8/IzMbD0c3F08zK2NPLx9DJztnBydLO09LL2tPS19TS29rU29bU4dnT5NzV6NvZ4+Hf5uDd6+Pi7eXj8ejl9Ozp9/Lw+wAAAAAAAAAAAAAAAErQjXwAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAHU0lEQVRYR5WWf1gbZx3A8bw2y7nJVq00ZM9Eq63t0o3QFNKkrLbjoRjXsWFHCI+T0gNNe2nWm4Ndm9xFTLmj1UFONsUU1s2aZRRxdP7otNZN1Omc1inTdbad06danzlkVoR2/hG/7w8gNG/Y9iE/uPf9vp/7vt/37r0UZPLx34nxiYmJNybp4VuSxzQ9MXn5zempqelLlybfpotteu31ifFzfzp7/sL45PT09MS/aPOCME1jZ8+fGxs9Njw0fGLswuT01D/+SjsWgmU6fnJs7IUTx7410N8/MDx64eKlqV++DRXD9M2BkZOnfjicTvV0d/f0Hx09f/HNf//iL7QzP7mmn0XN9BMjR9PpfhOpkkdHz0z97+9PT9DuvOSa7gvHus2vYEzT6E4MDP10/PKlM0/T7rzkmoLBeyORWMwwzf6UaZowvydPX7z8nzPP0v585JhO7pIkWZbvVXUzlUomzYNmcui7L49fvPDs6zQiDzmmr9UHg7vDu8MRVTcOHESq5KEjz7z8yitnfkwj8pBr2njHNjEo7ZbliGFAQsk+eB155vTpc6f/RkPY5JiOr7i1uh5UYUVROw4ehEolk1193zj2k9+NLpxUbsWXrt5YfdfnpDAUS9UgLaCrq2/g6JETT9IINrmmJStWb9wUCKK6K0h1wDCMDs1IHjr8Tk23F63aeOsdooSXUNU6O7QOTdM7937x0NAbNIRJrumrS4tWb64OiFKrJEshWdnXqWr7QqGO/fuHztIQJrmmzKKiFauc9aLYIkp7xHvkfXtCLSG5Y+TU1w8foRFMGKat7y1asbLaH/CLkNeO5h2trZJk/Oq3I/uHh/9IQ1gwTD+4qnBpkbPK5xf9zTua/c1+fyT1WLLnvi+8MPwoDWHBMEWDjuuFpc5P+Hz3iM3Ndb5mPZVOKfU93xnqj/2GxjDINb3q8PicJYUly2vkutZWURR1PdErtwz8+vloQPk+DWLAyMnjWb58ZUnhrsf3SJ9s8fl1TVWlwODzI/HaxrYFpscw1fscxY7Slc7Yc5Lkat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_LEGO_THINK, ICON_BASE64_PALM, ICON_BASE64_THINK]
|
||||
|
||||
|
@ -18147,6 +18201,7 @@ You have no financial responsibility.
|
|||
I hope you are enjoying using PySimpleGUI whether you sponsor the product or not.""")],
|
||||
[T('Click here to help --->>>'), T('YES - I want to support PySimpleGUI!', enable_events=True, text_color='red', background_color='yellow', k='-SPONSOR-')],]
|
||||
|
||||
pop_test_tab_layout = [[T('Popup Tests --->'), B('Popup', k='P '), B('No Titlebar', k='P NoTitle'), B('Not Modal', k='P NoModal'), B('Non Blocking', k='P NoBlock'), B('Auto Close', k='P AutoClose')]]
|
||||
|
||||
graph_elem = Graph((600, 150), (0, 0), (800, 300), key='+GRAPH+')
|
||||
|
||||
|
@ -18162,7 +18217,7 @@ I hope you are enjoying using PySimpleGUI whether you sponsor the product or not
|
|||
tab4 = Tab('Variable Choice', [[Frame('Variable Choice Group', frame4, title_color='blue')]], tooltip='tab 4', title_color='red', )
|
||||
tab5 = Tab('Text Input', [[Frame('TextInput', frame1, title_color='blue')]], tooltip='tab 5', title_color='red', )
|
||||
tab6 = Tab('Do NOT click', frame7)
|
||||
|
||||
tab7 = Tab('Popup Tests', pop_test_tab_layout)
|
||||
|
||||
|
||||
def VerLine(version, description, justification='r', size=(40,1)):
|
||||
|
@ -18179,14 +18234,14 @@ I hope you are enjoying using PySimpleGUI whether you sponsor the product or not
|
|||
VerLine(os.path.dirname(os.path.abspath(__file__)), 'PySimpleGUI Location', size=(40,2)),
|
||||
VerLine(sys.version, 'Python Version', size=(40, 2)),
|
||||
|
||||
[B(SYMBOL_DOWN, pad=(0,0), k='-HIDE TABS-'),pin(Col([[TabGroup([[tab1, tab2, tab3, tab6, tab4, tab5]], key='_TAB_GROUP_')]],k='-TAB GROUP-'))],
|
||||
[B(SYMBOL_DOWN, pad=(0,0), k='-HIDE TABS-'),pin(Col([[TabGroup([[tab1, tab2, tab3, tab6, tab4, tab5, tab7]], key='_TAB_GROUP_')]],k='-TAB GROUP-'))],
|
||||
[Button('Button'), B('Hide Stuff', metadata='my metadata'),
|
||||
Button('ttk Button', use_ttk_buttons=True, tooltip='This is a TTK Button'),
|
||||
Button('See-through Mode', tooltip='Make the background transparent'),
|
||||
Button('Upgrade PySimpleGUI from GitHub', button_color='white on red', key='-INSTALL-'),
|
||||
B('Sponsor this effort', button_color='white on dark green', key='-SPONSOR-2'),
|
||||
Button('Exit', tooltip='Exit button')],
|
||||
[T('Popup Tests --->'), B('Popup', k='P '), B('No Titlebar', k='P NoTitle'), B('Not Modal', k='P NoModal'), B('Non Blocking', k='P NoBlock'), B('Auto Close', k='P AutoClose'), B('Themes'),B('Switch Themes'),B('SDK Reference')]
|
||||
[ B(image_data=ICON_BUY_ME_A_COFFEE, key='-COFFEE-'),B('Themes'),B('Switch Themes'),B('SDK Reference')]
|
||||
]
|
||||
|
||||
layout = [[Column([[Menu(menu_def, key='_MENU_', font='Courier 15')]] + layout1), Column([[ProgressBar(max_value=800, size=(30, 25), orientation='v', key='+PROGRESS+')]])]]
|
||||
|
@ -18255,6 +18310,9 @@ def main():
|
|||
elif event.startswith('-SPONSOR-'):
|
||||
if webbrowser_available:
|
||||
webbrowser.open_new_tab(r'https://www.paypal.me/psgui')
|
||||
elif event == '-COFFEE-':
|
||||
if webbrowser_available:
|
||||
webbrowser.open_new_tab(r'https://www.buymeacoffee.com/PySimpleGUI')
|
||||
elif event == 'Themes':
|
||||
search_string = popup_get_text('Enter a search term or leave blank for all themes', 'Show Available Themes', keep_on_top=True)
|
||||
if search_string is not None:
|
||||
|
|
Loading…
Reference in New Issue