Martin Landa wrote:
> >> The __init__.py files are supposed to contain an __all__ array listing
> >> the modules and/or sub-packages. This matters on Windows, so that e.g.
> >> "from grass.lib import *" imports the modules with the correct case in
> >> the event that the filesystem entries have been converted to
> >> upper-case or camel-case.
> >
> > +1 for the __all__ statement.
>
> yes, how to dynamically add "lib" to __all__ list when swig/python is
> build successfully?
Code it in grass/__init__.py, e.g. (untested):
import os
__all__ = ["script"]
if os.path.exists(os.path.join(os.path.dirname(__file__),"lib","__init__.py")):
__all__.append("lib")
--
Glynn Clements <[email protected]>
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user