[GRASS-SVN] r59338 - grass/trunk/lib/python/script

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 25 10:40:42 PDT 2014


Author: martinl
Date: 2014-03-25 10:40:41 -0700 (Tue, 25 Mar 2014)
New Revision: 59338

Modified:
   grass/trunk/lib/python/script/core.py
Log:
wingrass: attempt to fix building manuals for py scripts (first step)

Modified: grass/trunk/lib/python/script/core.py
===================================================================
--- grass/trunk/lib/python/script/core.py	2014-03-25 17:40:00 UTC (rev 59337)
+++ grass/trunk/lib/python/script/core.py	2014-03-25 17:40:41 UTC (rev 59338)
@@ -13,7 +13,7 @@
 ...
 @endcode
 
-(C) 2008-2011 by the GRASS Development Team
+(C) 2008-2014 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS
 for details.
@@ -192,6 +192,9 @@
 
         # PATHEXT is necessary to check on Windows.
         pathext = os.environ.get("PATHEXT", "").split(os.pathsep)
+        map(lambda x: x.lower(), pathext) # force lowercase
+        if '.py' not in pathext:          # we assume that PATHEXT contains always '.py'
+            pathext.insert(0, '.py')
         # See if the given file matches any of the expected path extensions.
         # This will allow us to short circuit when given "python.exe".
         # If it does match, only test that one, otherwise we have to try



More information about the grass-commit mailing list