Proposed change for Extensions import and Extension registry

Jan-Oliver Wagner jan at intevation.de
Thu Nov 11 21:01:52 CET 2004


Hi,

after some thinking about how the extension are important
and registered I came to the conclusion that it
is better to have the extension registry entry in the
__init__.py file of the extensions' main directory
instead of in one of the files.

Also, in the __init__.py file the actual modules
could be imported. Thus, in ~/.thuban/thubanstart.py
you can write:
import Extensions.gns2shp
instead of
import Extensions.gns2shp.gns2shp

This is even more interesting if you have to
import more than one file like for the umn_mapserver
extension.

The good thing is that this is compatible with already
existing thubanstart.py files. You just don't have the
registry done.

Attached is a patch for gns2shp that illustrates what
I mean.

This is the last issue to complete the registry feature.
And I really want to remove this from my todo list soon.
It can easily be backported to 1.0 btw.

Best

	Jan

-- 
Jan-Oliver Wagner               http://intevation.de/~jan/

Intevation GmbH                      http://intevation.de/
FreeGIS                                http://freegis.org/




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)