diff options
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/modules/console_python.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py index 66956899076..59e4f2314d8 100644 --- a/release/scripts/modules/console_python.py +++ b/release/scripts/modules/console_python.py @@ -226,6 +226,8 @@ execute.hooks = [] def autocomplete(context): + _readline_bypass() + from console import intellisense sc = context.space_data @@ -356,3 +358,14 @@ def banner(context): sc.prompt = PROMPT return {'FINISHED'} + + +# workaround for readline crashing, see: T43491 +def _readline_bypass(): + if "rlcompleter" in sys.modules or "readline" in sys.modules: + return + + # prevent 'rlcompleter' from loading the real 'readline' module. + sys.modules["readline"] = None + import rlcompleter + del sys.modules["readline"] |