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

Glynn Clements glynn at gclements.plus.com
Sat Dec 26 23:44:31 EST 2009


> > 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.

That isn't the only issue. Even if it uses the correct version of
Python, it still won't run because it imports modules from wxGUI
(globalvar, gselect, goutput, menuform), but the "scripts" directory
is built before the "gui" directory.

> 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).

That would work. But I'd suggest putting the wxPython+wxGUI portion in
the "gui" directory and installing it to $GISBASE/etc/wxpython. The
front-end could go into either "gui" or "scripts", and be installed
into $GISBASE/scripts.

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


More information about the grass-dev mailing list