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

Moritz Lennert mlennert at club.worldonline.be
Fri Jul 26 08:59:31 PDT 2013


On 26/07/13 17:10, Helmut Kudrnovsky wrote:
>> IMHO the question is/will be: is there a robust mechanism for calling a
> script from a script and making>addons easily callable by the embedded
> python interpreter working on WinXp, WinVista, Win7 and Win8?
>>
>> if this is working robustely, I think we are on a good way for a nice
> (python) usable WinGrass6/7... :o)
>
> maybe there could be some hints to solve this?:
>
> Python launcher for Windows
> http://www.python.org/dev/peps/pep-0397/

This refers to the Python launcher that Glynn mentioned half a year ago:

http://lists.osgeo.org/pipermail/grass-dev/2013-January/061466.html

The launcher is explained here:

http://docs.python.org/3/using/windows.html#launcher

It actually allows the use of shebang lines:

http://docs.python.org/3/using/windows.html#shebang-lines

And it allows to create a py.ini file to customize the way Python is 
called. A version of that file in the "Application data" directory 
overrides systemwide settings, so I guess we could use something like 
that to customise if shebangs are not enough:

http://docs.python.org/3/using/windows.html#customization

In my limited understanding this actually sounds like a very promising 
solution which avoids having to treat Windows in a very different way. 
shebangs with '/usr/bin/env python' might allow us to solve the issue.

Moritz


More information about the grass-dev mailing list