Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tawindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'tawindow.py')
-rw-r--r--tawindow.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tawindow.py b/tawindow.py
index 7b70da3..2a514a3 100644
--- a/tawindow.py
+++ b/tawindow.py
@@ -1709,16 +1709,17 @@ class TurtleArtWindow():
"""
def _process_alphanumeric_input(self, keyname, keyunicode):
if len(self.selected_blk.spr.labels[0]) > 0:
- if self.selected_blk.spr.labels[0].count(CURSOR) == 0:
+ c = self.selected_blk.spr.labels[0].count(CURSOR)
+ if c == 0:
oldleft = self.selected_blk.spr.labels[0]
oldright = ''
elif len(self.selected_blk.spr.labels[0]) == 1:
oldleft = ''
oldright = ''
- else: # Why are getting a ValueError on occasion?
- try:
+ else:
+ try: # Why are getting a ValueError on occasion?
oldleft, oldright =\
- self.selected_blk.spr.labels[0].rsplit(CURSOR)
+ self.selected_blk.spr.labels[0].split(CURSOR)
except ValueError:
print "[%s]" % self.selected_blk.spr.labels[0]
oldleft = self.selected_blk.spr.labels[0]