From eb01f803fb53991989826e9d678cd8222e4d1e25 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Tue, 18 Jun 2019 11:47:06 -0400 Subject: [PATCH] Added __version__ (finally), Renamed Debugger class (will help a lot with IDE) --- PySimpleGUI.py | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 6d0218e1..791eb23b 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1,4 +1,6 @@ #!/usr/bin/python3 +__version__ = "4.0.0 Unreleased" + import sys if sys.version_info[0] >= 3: @@ -2009,7 +2011,7 @@ class Button(Element): pass elif self.BType == BUTTON_TYPE_SHOW_DEBUGGER: if self.ParentForm.DebuggerEnabled: - Debugger.debugger._build_floating_window() + _Debugger.debugger._build_floating_window() # show_debugger_window() if should_submit_window: @@ -5347,7 +5349,7 @@ class Window: :param event: """ - Debugger.debugger._build_main_debugger_window() + _Debugger.debugger._build_main_debugger_window() def _callback_popout_window_create_keystroke(self, event): """ @@ -5355,7 +5357,7 @@ class Window: :param event: """ - Debugger.debugger._build_floating_window() + _Debugger.debugger._build_floating_window() def EnableDebugger(self): """ """ @@ -9738,6 +9740,8 @@ def PopupGetText(message, title=None, default_text='', password_char='', size=(N return path +# --------------------------- PopupAnimated --------------------------- + def PopupAnimated(image_source, message=None, background_color=None, text_color=None, font=None, no_titlebar=True, grab_anywhere=True, keep_on_top=True, location=(None, None), alpha_channel=None, time_between_frames=0, transparent_color=None): @@ -9809,7 +9813,7 @@ MAX_LINES_PER_RESULT_MAIN = 3 POPOUT_WINDOW_FONT = 'Sans 8' -class Debugger(): +class _Debugger(): """ """ debugger = None @@ -10290,9 +10294,9 @@ def show_debugger_window(location=(None, None), *args): :param *args: """ - if Debugger.debugger is None: - Debugger.debugger = Debugger() - debugger = Debugger.debugger + if _Debugger.debugger is None: + _Debugger.debugger = _Debugger() + debugger = _Debugger.debugger frame = inspect.currentframe() prev_frame = inspect.currentframe().f_back # frame, *others = inspect.stack()[1] @@ -10314,9 +10318,9 @@ def show_debugger_popout_window(location=(None, None), *args): :param *args: """ - if Debugger.debugger is None: - Debugger.debugger = Debugger() - debugger = Debugger.debugger + if _Debugger.debugger is None: + _Debugger.debugger = _Debugger() + debugger = _Debugger.debugger frame = inspect.currentframe() prev_frame = inspect.currentframe().f_back # frame = inspect.getframeinfo(prev_frame) @@ -10334,9 +10338,9 @@ def show_debugger_popout_window(location=(None, None), *args): def refresh_debugger(): """ """ - if Debugger.debugger is None: - Debugger.debugger = Debugger() - debugger = Debugger.debugger + if _Debugger.debugger is None: + _Debugger.debugger = _Debugger() + debugger = _Debugger.debugger Window.read_call_from_debugger = True frame = inspect.currentframe() frame = inspect.currentframe().f_back