jan: thuban/Extensions/svgexport __init__.py,1.2,1.3

Bernhard Reiter bernhard at intevation.de
Fri Nov 26 16:20:09 CET 2004


On Thu, Nov 25, 2004 at 10:13:34PM +0100, Bernhard Herzog wrote:
> cvs at intevation.de writes:
> 
> > +# import the actual modules
> > +from os import environ
> > +try:
> > +    dummy = environ["DISPLAY"]
> > +    import svgsaver
> > +    import maplegend
> > +except:
> > +    pass # we don't have a DISPLAY, so don't import the modules
> > +         # (we probably are in test-mode)
> 
> That's not the right solution IMO.  No code should check whether it's
> running under the test suite or not.  I'm not sure yet what the best
> solution is, but as a first step, I'd say that the __init__ module in
> the extension packages should not import the GUI parts of the extension
> automatically.

I agree and wrote down more details in my other email.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20041126/115f982d/attachment.bin


More information about the Thuban-devel mailing list

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