[GRASS-SVN] r45963 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 13 15:53:19 EDT 2011


Author: martinl
Date: 2011-04-13 12:53:19 -0700 (Wed, 13 Apr 2011)
New Revision: 45963

Modified:
   grass/trunk/gui/wxpython/gui_modules/prompt.py
Log:
wxGUI: fix for python 2.4 cont'ed
       (merge r45962 from relbr64)


Modified: grass/trunk/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/prompt.py	2011-04-13 19:51:17 UTC (rev 45962)
+++ grass/trunk/gui/wxpython/gui_modules/prompt.py	2011-04-13 19:53:19 UTC (rev 45963)
@@ -850,8 +850,7 @@
             toComplete['entity'] = 'command'
             toComplete['cmd'] = cmd
             return toComplete
-                
-            
+    
     def GetWordLeft(self, withDelimiter = False, ignoredDelimiter = None):
         """!Get word left from current cursor position. The beginning
         of the word is given by space or chars: .,-= 
@@ -866,11 +865,13 @@
             ignoredDelimiter = ''
         
         for char in set(' .,-=') - set(ignoredDelimiter):
-            delimiter = '' if not withDelimiter else char
+            if not withDelimiter:
+                delimiter = ''
+            else:
+                delimiter = char
             parts.append(delimiter + textLeft.rpartition(char)[2])
         return min(parts, key=lambda x: len(x))
-        
-        
+         
     def ShowList(self):
         """!Show sorted auto-completion list if it is not empty"""
         if len(self.autoCompList) > 0:



More information about the grass-commit mailing list