Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-03-08 15:29:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-03-08 15:29:58 +0300
commit9ce5be370632449b0fe617348298b0eed3ed1b60 (patch)
tree77d26b08fa36dad7f5b0dd9f33a3536247644a97 /release/scripts/modules/bpy/__init__.py
parent1138214a8cc585b9c384cc99b8f8017edbc737ea (diff)
workaround for [#21486] Python debuger pdb don't work
setting sys.stdin to None is done so python wont lock blender when it tries to read from the input. - help() from the console does this. Running blender with -d keeps the stdin so python debugging can work. add info in the help message about this. eventually it might be best to replace sys.stdin with our own object which interacts with the console but this is not trivial.
Diffstat (limited to 'release/scripts/modules/bpy/__init__.py')
-rw-r--r--release/scripts/modules/bpy/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py
index 12f8e19cef4..234d7993789 100644
--- a/release/scripts/modules/bpy/__init__.py
+++ b/release/scripts/modules/bpy/__init__.py
@@ -46,7 +46,9 @@ def _main():
# a bit nasty but this prevents help() and input() from locking blender
# Ideally we could have some way for the console to replace sys.stdin but
# python would lock blender while waiting for a return value, not easy :|
- _sys.stdin = None
+
+ if not app.debug:
+ _sys.stdin = None
# if "-d" in sys.argv: # Enable this to measure startup speed
if 0: