[GRASS-user] problems compiling grass 7
landa.martin at gmail.com
Thu Jun 18 14:46:49 EDT 2009
2009/6/18 Glynn Clements <glynn at gclements.plus.com>:
>> >> etc/python/grass/__init__.py shouldn't contain "import lib" - it's
>> >> bug.
>> > Commenting "import lib" soved it.
>> OK, anyway it's wrong that this line was written to __init__.py when
>> compilation of Python Swig failed.
> IMHO, this line shouldn't be written in either case. Code wishing to
> use the SWIG bindings should explicitly use "import grass.lib". Or,
> preferably, import "grass.lib.grass" etc. Loading a dozen libraries
> "just in case" is a waste of resources and a potential source of
> Actually, I see no reason for grass/__init__.py to exist. Code can
> just import grass.script or grass.lib or both as required.
probably I misunderstand, but if I remove __init__.py, import fails, e.g.
>>> import grass.script as grass
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named grass.script
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa
More information about the grass-user