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

Moritz Lennert mlennert at club.worldonline.be
Thu Jul 25 08:49:18 PDT 2013


On 12/07/13 23:50, Helmut Kudrnovsky wrote:
>> - the python issues in wingrass (notably how to correctly install python
>> to be able to launch scripts and addons)
>
> IMHO it's one of the showstoppers in winGRASS7
>
> not only correctly installing python, but also what is the
> structure/approach in C:\Users\xxxx\AppData\Roaming\GRASS7\addons\ of
> installing python-scripts and bat-wrappers and also related the make-files
> for addons

I'm currently trying to understand all the issues concerning Python in 
wingrass (I don't think there are any issues concerning Python in 
GNU/Linux, don't know about Mac). Here's what I've understood so far:

- One of the issues is whether and how to install Python. As Python is 
needed both for the wxgui and for scripting, and scripting is something 
for which you cannot assume an embedded Python interpreter, the 
preferred solution would be to install Python system-wide using the 
official Python installer (i.e. possibly having the GRASS installer test 
for Python installation and if not present, propose to launch the 
download and execution of the official Python installer). This also 
entails the necessity to download and install the relevant packages 
(wxPython, numpy, etc).

- Another issue is how to make it possible in windows to launch modules 
that are Python scripts by simply calling their module name, without .py 
extension. At this stage, in a fresh installation of GRASS7 on WinXP, I 
can launch (and successfully execute) python scripts from the wxGUI menu 
or the wxGUI command console, but not from the windows terminal. 
However, calling a script from a script (e.g. v.db.dropcolumn called 
from v.db.renamecolumn) does not work.

- A third issue, related to the previous IIUC, is how to integrate (i.e. 
make launchable) script addons.

Is this a correct summary of the issues ? Anything I'm missing ?

Moritz



More information about the grass-dev mailing list