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

Glynn Clements glynn at gclements.plus.com
Tue Jan 21 07:34:06 PST 2014


Moritz Lennert wrote:

> Another option would be to do what Glynn has been proposing all along 
> (IIUC), which is to not install Python with Wingrass, but rather leave 
> it up to the user to make sure a suitable Python is installed in the 
> path.

Actually, my preference would be to first check whether a suitable
Python installation already exists. If it doesn't, offer the user the
option of installing it (by "inatall", I mean download and execute the
appropriate MSI from python.org).

That also means that additional packages (wxPython, NumPy) have to be
installed for the user's Python version, not some fixed version.

Where it gets problematic is if the user already has a Python
installation but it's not suitable for whatever reason. In the worst
case they may be faced with a choice between using GRASS or using
whatever the existing Python was installed for.

The same issue potentially exists on Unix, but it's easier to work
around due to the "#!/usr/bin/env python" hack, as we can just put a
"python" symlink in $GISBASE/bin. In effect, we're using "env" as a
Python launcher on Unix.

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


More information about the grass-dev mailing list