[GRASS-user] import wx
Glynn Clements
glynn at gclements.plus.com
Fri Jul 16 18:29:25 EDT 2010
Matthias Oswald wrote:
> I'writing a python-script with a wx-gui (not in grass style) including
> some grass-commands.Therefore I want to import the wx library by
> using:
>
> import wx
Apart from any other issues, the correct way to import wxPython is
e.g.:
import wxversion
wxversion.select('2.8')
import wx
The "wx" module may not even be present in the search path until
wxversion.select() has been called.
Many systems add a symlink to a "default" version of wxPython for
backward compatibility with programs which pre-date the wxversion
module, but you shouldn't rely upon this either existing or referring
to the correct version.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list