[GRASS-dev] v.krige seems hard coded to Python 2.6

Glynn Clements glynn at gclements.plus.com
Fri Dec 25 01:12:00 EST 2009


William Kyngesburye wrote:

> I think the problem is that all modules are run during compilation to
> generate the help file.  But v.krige (like all other python scripts) has
> that #!/usr/bin/python in it, which then runs the default python 2.6,
> AND in 64bit mode so it fails to load the 32bit-only wxpython.

It's actually "#!/usr/bin/env python", but the result is likely to be
the same.

> During compilation, it doesn't know where to find the python wrapper I
> created to take care of the 64bit/pythonw problem (which would also have
> the python version taken care of for you).
> (http://trac.osgeo.org/grass/ticket/841)
> 
> I'll see if I can work something out on the OSX side.  Though as Glynn
> pointed out in that bug report, scripts should probably not be using
> wxpython directly (a module processes data and exits), or such scripts
> should not be in the scripts folder but on their own (maybe as a GUI
> module?).

I think that v.krige should be split into a simple front-end script
which doesn't "import wx", and an application. The front-end script
would invoke the main script via $GRASS_PYTHON once grass.parser()
returns (*if* it returns, which it doesn't for --help etc).

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


More information about the grass-dev mailing list