[GRASS-windows] Re: r.basin for windows [was Re:
WinGrass6.5.svn-installer with selected addons]
Helmut Kudrnovsky
hellik at web.de
Fri Oct 21 14:37:05 EDT 2011
Glynn Clements:
>> why is then the wxgui working normally?
>
>The wx GUI is invoked via $GRASS_PYTHON.
>
>This was originally done because the wx GUI contained binary modules
>(vdigit and nviz) which would only work with the specific version of
>the Python interpreter for which they were compiled.
I've tried all this above with a corresponding r.basin.bat, r.wf.bat and
r.ipso.bat in C:\Program Files\GRASS 6.5.SVN\bin (the python-scripts
r.basin.py, r.wf.py, r.ipso.py are in C:\Program Files\GRASS
6.5.SVN\scripts).
but I'm not sure the content of r.basin.bat should
@"%GRASS_PYTHON%" "%GISBASE%\scripts\r.basin.py" %*
or
@"%GRASS_PYTHON%" "%GISBASE%/scripts/r.basin.py" %*
>> is it possible to test which python interpreter is associated with the
>> .py-extension?
>
>Create a Python script (with a .py extension) which prints useful
>information (e.g. sys.prefix, sys.path, sys.version, etc), then
>"execute" it via any native interface, e.g. system() in C, os.system()
>or subprocess.Popen(..., shell=True) in Python, or "cmd /c ..." from a
>shell script.
>
>The "sys" module is part of the main Python DLL, so it isn't affected
>by PYTHONHOME and PYTHONPATH.
my little python-testscript is:
testpython.py
#!/usr/bin/env python
import sys
print sys.prefix
print
print sys.path
print
print sys.version
(1) in the wingrass-msys-shell within a grass-session:
GRASS 6.5> echo $PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY
GRASS 6.5> echo $PYTHONPATH
/C/Program Files/GRASS 6.5.SVN/etc/python:/C/Program Files/GRASS
6.5.SVN/etc/python:/C/Program Files/GRASS 6.5.SVN/Python25:
GRASS 6.5> echo $PYTHONHOME
C:\Program Files\GRASS 6.5.SVN\Python25
GRASS 6.5> testpython.py
C:\Program Files\GRASS 6.5.SVN\Python25
['c:\\Users\\syringia',
'c:\\Program Files\\GRASS 6.5.SVN\\etc\\python',
'c:\\Program Files\\GRASS 6.5.SVN\\Python25',
'c:\\Program Files\\GRASS 6.5.SVN\\extralib\\python25.zip',
'C:\\Program Files\\GRASS 6.5.SVN\\Python25\\DLLs',
'C:\\Program Files\\GRASS 6.5.SVN\\Python25\\lib',
'C:\\Program Files\\GRASS 6.5.SVN\\Python25\\lib\\plat-win',
'C:\\Program Files\\GRASS 6.5.SVN\\Python25\\lib\\lib-tk',
'c:\\Program Files\\GRASS 6.5.SVN\\extrabin',
'C:\\Program Files\\GRASS 6.5.SVN\\Python25\\lib\\site-packages',
'C:\\Program Files\\GRASS 6.5.SVN\\Python25\\lib\\site-packages\\win32',
'C:\\Program Files\\GRASS
6.5.SVN\\Python25\\lib\\site-packages\\win32\\lib',
'C:\\Program Files\\GRASS 6.5.SVN\\Python25\\lib\\site-packages\\Pythonwin',
'C:\\Program Files\\GRASS
6.5.SVN\\Python25\\lib\\site-packages\\wx-2.8-msw-unicode']
2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
(2) in a windows command line outside any grass-session:
C:\Users\syringia>echo %PATHEXT%
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
C:\Users\syringia>testpython.py
C:\Python26\ArcGIS10.0
['C:\\Users\\syringia',
'C:\\windows\\system32\\python26.zip',
'C:\\Python26\\ArcGIS10.0\\DLLs',
'C:\\Python26\\ArcGIS10.0\\lib',
'C:\\Python26\\ArcGIS10.0\\lib\\plat-win',
'C:\\Python26\\ArcGIS10.0\\lib\\lib-tk',
'C:\\Python26\\ArcGIS10.0',
'C:\\Python26\\ArcGIS10.0\\lib\\site-packages',
'C:\\Program Files\\ArcGIS\\Desktop10.0\\bin',
'C:\\Program Files\\ArcGIS\\Desktop10.0\\arcpy',
'C:\\Program Files\\ArcGIS\\Desktop10.0\\ArcToolbox\\Scripts']
2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)]
any mixing of the different python versions within the grass-session?
Helmut
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WinGrass6-5-svn-installer-with-selected-addons-tp6873977p6918034.html
Sent from the Grass - Win mailing list archive at Nabble.com.
More information about the grass-windows
mailing list