[GRASS-dev] Handling of Python scripts on MS Windows

Helmut Kudrnovsky hellik at web.de
Wed Oct 9 09:08:29 PDT 2013


> I was referring to cmd.exe *within* a GRASS session. 

ok, 2 tests with another windows VISTA box because of travelling (win7-box
from earlier test not available atm), now within a GRASS session:

---------------------------
winGRASS-session (1)
winGRASS 7 standalone installer and no python installation
winGRASS 7 standalone installer bundled with Python 2.7.4 (default, Apr  6
2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win32

System Info                                                                     
GRASS version: 7.0.svn                                                          
GRASS SVN Revision: 57955                                                       
Build Date: 2013-10-08                                                          
GIS Library Revision: 56211 (2013-05-12)                                        
GDAL/OGR: 1.9.2                                                                 
PROJ.4: 4.8.0                                                                   
GEOS: 3.3.6dev                                                                  
SQLite: 3.7.17                                                                  
Python: 2.7.4                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-Vista-6.0.6002-SP2   

C:\Users\xxxx>assoc .py
Dateizuordnung für die Erweiterung .py nicht gefunden.
File association for the extension. py not found.

C:\Users\xxxx>ftype python.file
Dateityp "python.file" nicht gefunden, oder diesem Dateityp wurde kein
Öffnen-Befehl zugeordnet.
File type "python.file" not found or no associated open command.

C:\Users\xxxx>echo %PATHEXT%
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY

---------------------------
winGRASS-session (2)
winGRASS 7 standalone installer and a www.python.org 2.7.5 installation
(system wide installed in C:\Python27)
winGRASS 7 standalone installer bundled with Python 2.7.4 (default, Apr  6
2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win32

System Info                                                                     
GRASS version: 7.0.svn                                                          
GRASS SVN Revision: 57955                                                       
Build Date: 2013-10-08                                                          
GIS Library Revision: 56211 (2013-05-12)                                        
GDAL/OGR: 1.9.2                                                                 
PROJ.4: 4.8.0                                                                   
GEOS: 3.3.6dev                                                                  
SQLite: 3.7.17                                                                  
Python: 2.7.4                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-Vista-6.0.6002-SP2  

C:\Users\xxxx>assoc .py
.py=Python.File

C:\Users\xxxx>ftype python.file
python.file="C:\Python27\python.exe" "%1" %*

C:\Users\normal>echo %PATHEXT%
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY

testscript.py:

import sys
print "Hello, World!"
print sys.version

C:\wd\pytest>python testscript.py
Hello, World!
2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
---------------------------

the earlier test was in a win7-box with following python installation

>>python is installed by ArcGIS on this testing box here.
>>
>>ArcGIS 10.0 installed C:\Python26\ArcGIS10.0
>>
>>after upgrade
>>
>>ArcGIS 10.1 installed C:\Python27\ArcGIS10.1

>It suggests that the registry keys are inconsistent. 
[...]
>ftype and assoc show the system-wide settings, but these are ignored
>if there are per-user keys. If the per-user keys exist but the values
>are invalid, executing a script will result in a dialog asking you to
>select the program to open that type of file. 

could it be that ArcGIS installs a "inconsistent" python? if yes how to deal
with this? 
AFAIK most of the winGRASS-users has also ArcGIS installed.





-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Handling-of-Python-scripts-on-MS-Windows-tp5081335p5082670.html
Sent from the Grass - Dev mailing list archive at Nabble.com.


More information about the grass-dev mailing list