PrEditor 0.9.0__tar.gz → 0.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of PrEditor might be problematic. Click here for more details.
- {preditor-0.9.0 → preditor-0.10.0}/PKG-INFO +1 -1
- {preditor-0.9.0 → preditor-0.10.0}/PrEditor.egg-info/PKG-INFO +1 -1
- {preditor-0.9.0 → preditor-0.10.0}/preditor/__init__.py +41 -41
- {preditor-0.9.0 → preditor-0.10.0}/preditor/version.py +2 -2
- {preditor-0.9.0 → preditor-0.10.0}/.coveragerc +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/.github/ISSUE_TEMPLATE/BUG_REPORT.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/.github/workflows/release.yml +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/.github/workflows/static-analysis-and-test.yml +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/.gitignore +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/.pre-commit-config.yaml +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/CODE_OF_CONDUCT.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/CONTRIBUTING.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/LICENSE +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/MANIFEST.in +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/PrEditor.egg-info/SOURCES.txt +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/PrEditor.egg-info/dependency_links.txt +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/PrEditor.egg-info/entry_points.txt +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/PrEditor.egg-info/requires.txt +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/PrEditor.egg-info/top_level.txt +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/README.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/examples/add_to_app.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/examples/output_capture_and_show.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/__main__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/about_module.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/cli.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/contexts.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/cores/__init__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/cores/core.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/dccs/maya/PrEditor_maya.mod +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/dccs/maya/plug-ins/PrEditor_maya.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/debug.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/delayable_engine/__init__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/delayable_engine/delayables.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/enum.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/__init__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/app.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/codehighlighter.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/completer.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/console.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/dialog.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/drag_tab_bar.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/editor_chooser.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/errordialog.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/find_files.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/fuzzy_search/__init__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/fuzzy_search/fuzzy_search.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/group_tab_widget/__init__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/group_tab_widget/grouped_tab_menu.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/group_tab_widget/grouped_tab_models.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/group_tab_widget/grouped_tab_widget.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/group_tab_widget/one_tab_widget.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/level_buttons.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/logger_window_handler.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/logger_window_plugin.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/loggerwindow.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/newtabwidget.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/redmine_login_dialog.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/set_text_editor_path_dialog.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/status_label.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/suggest_path_quotes_dialog.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/ui/editor_chooser.ui +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/ui/errordialog.ui +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/ui/find_files.ui +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/ui/loggerwindow.ui +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/ui/redmine_login_dialog.ui +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/ui/set_text_editor_path_dialog.ui +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/ui/suggest_path_quotes_dialog.ui +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/window.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/workbox_mixin.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/workbox_text_edit.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/gui/workboxwidget.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/logging_config.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/osystem.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/plugins.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/prefs.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/environment_variables.html +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/error_mail.html +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/error_mail_inline.html +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/README.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/arrow_forward.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/check-bold.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/chevron-down.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/chevron-up.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/close-thick.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/comment-edit.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/content-copy.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/content-cut.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/content-duplicate.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/content-paste.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/content-save.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/debug_disabled.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/eye-check.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/file-plus.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/file-remove.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/format-align-left.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/format-letter-case-lower.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/format-letter-case-upper.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/format-letter-case.svg +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/information.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/logging_critical.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/logging_custom.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/logging_debug.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/logging_error.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/logging_info.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/logging_not_set.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/logging_warning.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/marker.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/play.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/playlist-play.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/plus-minus-variant.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/preditor.ico +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/preditor.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/preditor.psd +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/preditor.svg +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/regex.svg +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/restart.svg +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/skip-forward-outline.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/skip-next-outline.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/skip-next.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/skip-previous.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/subdirectory-arrow-right.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/text-search-variant.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/img/warning-big.png +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/lang/python.json +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/settings.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/stylesheet/Bright.css +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/resource/stylesheet/Dark.css +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/__init__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/delayables/__init__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/delayables/smart_highlight.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/delayables/spell_check.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/documenteditor.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/finddialog.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/__init__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/bash.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/batch.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/cpp.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/css.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/eyeonscript.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/html.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/javascript.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/lua.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/maxscript.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/mel.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/mu.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/nsi.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/perl.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/puppet.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/python.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/ruby.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/sql.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/xml.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/config/yaml.ini +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lang/language.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lexers/__init__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lexers/cpplexer.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lexers/javascriptlexer.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lexers/maxscriptlexer.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lexers/mellexer.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lexers/mulexer.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/lexers/pythonlexer.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/scintilla/ui/finddialog.ui +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/settings.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/stream/__init__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/stream/director.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/stream/manager.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/streamhandler_helper.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/utils/__init__.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/utils/cute.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/utils/stylesheets.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/utils/text_search.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/preditor/weakref.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/pyproject.toml +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/requirements.txt +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/setup.cfg +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/setup.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/re_greedy_False_0_True.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/re_greedy_False_2_True.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/re_greedy_True_2_True.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/re_greedy_upper_True_2_True.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/re_simple_False_0_True.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/re_simple_False_2_True.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/re_simple_False_3_True.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/re_simple_True_2_True.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/simple_False_0_False.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/simple_False_1_False.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/simple_False_2_False.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/simple_False_3_False.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/simple_True_2_False.md +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/tab_text.txt +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/find_files/test_find_files.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/ide/test_delayable_engine.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tests/test_stream.py +0 -0
- {preditor-0.9.0 → preditor-0.10.0}/tox.ini +0 -0
|
@@ -66,51 +66,74 @@ def init():
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
def configure(name, parent_callback=None, excepthook=True, logging=True, streams=True):
|
|
69
|
-
"""Global configuration of PrEditor.
|
|
69
|
+
"""Global configuration of PrEditor. Safe to re-call until the instance is created.
|
|
70
|
+
|
|
71
|
+
Configures the instance of PrEditor without creating the GUI. It should be run
|
|
72
|
+
as early as possible in the applications initialization to allow PrEditor to
|
|
73
|
+
show as much stdout/err text as possible even the text printed before the
|
|
74
|
+
application's GUI is created.
|
|
75
|
+
|
|
76
|
+
Once `preditor.instance(create=True)` is called this will return without
|
|
77
|
+
making any changes. Otherwise unless noted with "First call only." each time
|
|
78
|
+
this function is called it will update any previously set values. This allows
|
|
79
|
+
you to minimally configure PrEditor and as more of the application comes
|
|
80
|
+
online enable more advanced features.
|
|
70
81
|
|
|
71
82
|
Args:
|
|
72
83
|
name (str): The core_name to use for the global instance of PrEditor.
|
|
73
84
|
Once this has been set, you can call `launch` without passing name
|
|
74
|
-
to access the main instance.
|
|
85
|
+
to access the main instance. The core_name controls what preferences
|
|
86
|
+
are loaded and used by PrEditor including the workbox tabs.
|
|
75
87
|
parent_callback (callable, optional): Callback that returns a QWidget
|
|
76
88
|
to use as the parent of the LoggerWindow when its first created.
|
|
77
89
|
This can be used by DCC's to set the parent to their main window.
|
|
78
|
-
excepthook (bool, optional): Replaces `sys.excepthook`
|
|
79
|
-
exception handler that prompts the user to show
|
|
80
|
-
python exception is raised.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
excepthook (bool, optional): First call only. Replaces `sys.excepthook`
|
|
91
|
+
with a interactive exception handler that prompts the user to show
|
|
92
|
+
PrEditor when an python exception is raised. It is recommended that
|
|
93
|
+
you only add the excepthook once the Qt UI is initialized.
|
|
94
|
+
logging (bool, optional): Restore the python logging configuration settings
|
|
95
|
+
that were recorded the last time PrEditor prefs were saved. If called
|
|
96
|
+
multiple times with different core_name's before the instance is
|
|
97
|
+
created, this will reset the logging configuration from the previous
|
|
98
|
+
core_name if logging prefs exist.
|
|
99
|
+
streams (bool, optional): First call only. Install the stream manager to
|
|
100
|
+
capture any stdout/stderr text written. Later when calling launch, the
|
|
85
101
|
LoggerWindow will show all of the captured text. This lets you only
|
|
86
|
-
create the LoggerWindow IF you need to, but when you do it
|
|
87
|
-
all of the std stream text written after this call.
|
|
102
|
+
create the LoggerWindow IF you need to show it, but when you do it
|
|
103
|
+
will have all of the std stream text written after this call.
|
|
88
104
|
"""
|
|
89
|
-
# Once
|
|
90
|
-
if
|
|
105
|
+
# Once the UI instance has been created, configure should not do anything.
|
|
106
|
+
if instance(create=False):
|
|
91
107
|
return
|
|
92
108
|
|
|
93
|
-
# Store the core_name
|
|
109
|
+
# Store the core_name.
|
|
110
|
+
changed = _global_config.get('core_name') != name
|
|
94
111
|
_global_config['core_name'] = name
|
|
95
112
|
if parent_callback:
|
|
96
|
-
|
|
113
|
+
_global_config['parent_callback'] = parent_callback
|
|
97
114
|
|
|
98
|
-
if streams:
|
|
115
|
+
if streams and not _global_config.get('streams_installed'):
|
|
99
116
|
# Install the stream manager to capture output
|
|
100
117
|
from preditor.stream import install_to_std
|
|
101
118
|
|
|
102
119
|
install_to_std()
|
|
120
|
+
_global_config['streams_installed'] = True
|
|
103
121
|
|
|
104
|
-
if logging:
|
|
122
|
+
if logging and changed:
|
|
123
|
+
# Only update the logging config if the core name has changed.
|
|
124
|
+
# Note: When called repeatedly, this won't remove old logger's added by
|
|
125
|
+
# the previous calls so you may see some loggers added that were never
|
|
126
|
+
# actually added by code other than the LoggingConfig.
|
|
105
127
|
from .logging_config import LoggingConfig
|
|
106
128
|
|
|
107
129
|
cfg = LoggingConfig(core_name=name)
|
|
108
130
|
cfg.load()
|
|
109
131
|
|
|
110
|
-
if excepthook:
|
|
132
|
+
if excepthook and not _global_config.get('excepthook_installed'):
|
|
111
133
|
import preditor.debug
|
|
112
134
|
|
|
113
135
|
preditor.debug.BlurExcepthook.install()
|
|
136
|
+
_global_config['excepthook_installed'] = True
|
|
114
137
|
|
|
115
138
|
|
|
116
139
|
def get_core_name():
|
|
@@ -239,29 +262,6 @@ def parent_callback():
|
|
|
239
262
|
return _global_config.get("parent_callback")
|
|
240
263
|
|
|
241
264
|
|
|
242
|
-
def set_parent_callback(parent_callback, if_unset=True):
|
|
243
|
-
"""Update the parent_callback even if it was already set.
|
|
244
|
-
|
|
245
|
-
This is useful for cases where `configure` is called before it's possible to
|
|
246
|
-
provide the parent_callback.
|
|
247
|
-
|
|
248
|
-
Note: Changing this does not re-parent an existing instance of LoggerWindows.
|
|
249
|
-
If you change this after the LoggerWindow instance has been created you will
|
|
250
|
-
need to manually re-parent it.
|
|
251
|
-
|
|
252
|
-
Args:
|
|
253
|
-
if_unset(bool): If True then only set this value if the parent_callback
|
|
254
|
-
hasn't already been set.
|
|
255
|
-
|
|
256
|
-
Returns:
|
|
257
|
-
bool: Returns False if if_unset is True and it was already set.
|
|
258
|
-
"""
|
|
259
|
-
if "parent_callback" in _global_config and not if_unset:
|
|
260
|
-
return False
|
|
261
|
-
_global_config["parent_callback"] = parent_callback
|
|
262
|
-
return True
|
|
263
|
-
|
|
264
|
-
|
|
265
265
|
def connect_preditor(
|
|
266
266
|
parent, sequence='F2', text='Show PrEditor', obj_name='uiShowPreditorACT', name=None
|
|
267
267
|
):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|