Subject: [Thuban-list] trouble loading extension

From: "Moritz Lennert" <[email-masked]>
Date: Wed, 10 Nov 2004 14:22:57 +0100 (CET)

Hello,

I guess I just haven't understood the process completely, but I just can't
get extensions to be loaded with a freshly compiled CVS version on debian.

I tried copying the svgexport directory from the thuban/Extensions
dircectory to my .thuban directory and then using "import svgexport" in
thubanstart, but I get no Extensions menu, nor can I find the svg export
functions anywhere else.

I also tried setting the PYTHONPATH variable to /usr/lib/thuban/Extensions
and then add an "import importAPR" into thubanstart. Same results...

Could someone explain how I should proceed ?

Moritz

---

From: Silke Reimer <[email-masked]>
Date: Wed, 10 Nov 2004 15:00:32 +0100

Hi Moritz,

> Could someone explain how I should proceed ?

Normally the Extension has a name (i.e. svgexport, importAPR etc.)
and one or several modules within the extension that can be loaded.
For importAPR you can only import the module importAPR but for
svgexport the module is named svgsaver and for the umn_mapserver
extension you have mf_export and mf_import and so on.

So, if /usr/lib/thuban/Extensions is in your PYTHONPATH you should
type

import importAPR.importAPR
import svgexport.svgsaver
import umn_mapserver.mf_export
import umn_mapserver.mf_import
etc.

If you don't have the Extensions directory in your PYTHONPATH the
following should do it:

import Extensions.importAPR.importAPR
import Extensions.svgexport.svgsaver
import Extensions.umn_mapserver.mf_export
import Extensions.umn_mapserver.mf_import

In some extensions (unfortunately not in all) their is a README
explaining which extension can be loaded and how.

Greetings,

	Silke

-- 
Silke Reimer

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