diff options
author | Walter Bender <walter@sugarlabs.org> | 2013-07-25 20:38:38 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2013-07-25 20:38:38 (GMT) |
commit | 7fcbc8b6e7ccc07776d92c0535edc5bd5681e005 (patch) | |
tree | e5931351df1885a8cb026173a09cd8c12d8fd162 /TurtleArt | |
parent | 0aa7f0e5e65e96fb8f32ffcdf0b1112f26988899 (diff) |
fix problems with non-interactive mode
Diffstat (limited to 'TurtleArt')
-rw-r--r-- | TurtleArt/tawindow.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 217a6e5..e20a1cf 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -4480,6 +4480,8 @@ before making changes to your Turtle Blocks program')) def _find_proto_name(self, name, label, palette='blocks'): ''' Look for a protoblock with this name ''' + if not self.interactive_mode: + return False if isinstance(name, unicode): name = name.encode('ascii', 'replace') if isinstance(label, unicode): @@ -4502,6 +4504,8 @@ before making changes to your Turtle Blocks program')) def _new_stack_block(self, name): ''' Add a stack block to the 'blocks' palette ''' + if not self.interactive_mode: + return if isinstance(name, (float, int)): return if isinstance(name, unicode): @@ -4529,6 +4533,8 @@ before making changes to your Turtle Blocks program')) def _new_box_block(self, name): ''' Add a box block to the 'blocks' palette ''' + if not self.interactive_mode: + return if isinstance(name, (float, int)): return if isinstance(name, unicode): @@ -4557,6 +4563,8 @@ before making changes to your Turtle Blocks program')) def _new_storein_block(self, name): ''' Add a storin block to the 'blocks' palette ''' + if not self.interactive_mode: + return if isinstance(name, (float, int)): return if isinstance(name, unicode): |