[GRASS-dev] Python handling in winGRASS7 [was: Re: GRASS GIS 7 tech-preview release preparations]

Glynn Clements glynn at gclements.plus.com
Sat Jul 27 11:08:14 PDT 2013


Helmut Kudrnovsky wrote:

> Python Launcher for Windows is a interesting concept for switching between
> python versions or for pointing to a specific python interpreter.
> 
> shebang + py.ini seems to work (see tests in the ticket).
> 
> IIUC, by this concept a WinGrass-python script would have to be invoked by
> py.exe (Python Launcher for Windows)?

The idea is that you associate the .py extension with py.exe, and it
figures out which python.exe to use for a given script.

> - could this be integrated in WinGrass?

Maybe, but it has many of the same issues as any other approach which
affects system-wide configuration.

> - would this help to type only r.xxxx in the WinGrass7-windows-console
> without the .py-extension to start a grass-python-script?

Invoking scripts without an extension requires that the extension is
present in PATHEXT.

> - would this help to call a python-script within a python-script?
> - would this help for http://trac.osgeo.org/grass/ticket/2015?

The bottom line is that the .py extension has to be associated with a
Python interpreter, or something which invokes one (e.g. py.exe).

There are multiple valid solutions, and GRASS cannot impose a
particular one.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list