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

Markus Metz markus.metz.giswork at gmail.com
Mon Feb 3 00:54:49 PST 2014


Glynn Clements wrote:
>
> Markus Metz wrote:
>
>> > "Executing" a script uses the registry associations for the script's
>> > extension.
>>
>> WinGRASS does not set registry associations for Python scripts, nor
>> does it install Python system-wide. This is because we do not want to
>> modify an existing Python installation.
>
> The registry associations are set by the Python installer. This is why
> you can't reasonably bundle Python.

GRASS does not come with a Python installer.

Other projects such as gimp or libreoffice are AFAICT reasonably
bundled with Python, without a Python installer.
>
>> > Attempting to by-pass the system's script execution mechanism (by
>> > explicitly executing Python scripts via a specific interpreter) is the
>> > cause of all the trouble.
>>
>> I disagree. Troubles arise if the system's interpreter, e.g. Python
>> installed by ArcGIS, is used instead of the python version embedded in
>> WinGRASS.
>
> Most of the troubles arise from attempting to use a mixture of a
> bundled version and a system-wide installation.

I agree. It seems that the wxGUI always uses the bundled GRASS_PYTHON,
the reason why the wxGUI works fine without a system-wide Python.

> Which wouldn't be an
> issue if people didn't attempt to bundle Python.

Other projects do bundle Python, and there it seems to work just fine.

I don't understand why we can not also bundle Python, including all
required Python packages.

Otherwise, users would need to install Python, wxPython, numpy, scipy,
matplotlib, datetime themselves (not sure if the list is correct and
complete).

Markus M


More information about the grass-dev mailing list