Update word_utils.py

This commit is contained in:
chrys87 2016-12-20 16:28:24 +01:00 committed by GitHub
parent cbad58e628
commit 032c7d5452

View File

@ -12,7 +12,7 @@ def getPrevWord(currX,currY, currText):
endOfScreen = False
if currText == '':
return -1, -1, '', endOfScreen, lineBreak
if currText.strip(string.whitespace) == '':
if currText.strip( string.whitespace) == '':
return currX, currY, '', endOfScreen, lineBreak
x, y, currWord, endOfScreen, lineBreakCurrWord = getCurrentWord(currX,currY,currText)
if endOfScreen:
@ -41,7 +41,7 @@ def getCurrentWord(currX,currY, currText):
endOfScreen = False
if currText == '':
return -1, -1, '', endOfScreen, lineBreak
if currText.strip(string.whitespace) == '':
if currText.strip( string.whitespace) == '':
return currX, currY, '', endOfScreen, lineBreak
x = currX
y = currY
@ -84,7 +84,7 @@ def getNextWord(currX,currY, currText):
endOfScreen = False
if currText == '':
return -1, -1, '', endOfScreen, lineBreak
if currText.strip(string.whitespace) == '':
if currText.strip( string.whitespace) == '':
return currX, currY, '', endOfScreen, lineBreak
x = currX
y = currY