[GRASS-SVN] r45965 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 13 15:56:06 EDT 2011


Author: martinl
Date: 2011-04-13 12:56:06 -0700 (Wed, 13 Apr 2011)
New Revision: 45965

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


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py	2011-04-13 19:54:41 UTC (rev 45964)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/prompt.py	2011-04-13 19:56:06 UTC (rev 45965)
@@ -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