[Zope] Re: External Method importing modules

Tres Seaver tseaver at palladion.com
Tue Feb 13 12:58:27 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alan wrote:
> Dear Andreas and Jonathan, first a mistake: I want to access
> 'Extensions' folder as you mentioned Jonathan, not 'import'.
> 
> Andreas, I've done that, I can see several path there like
> .../instance/Products/Sprout/src, .../lib/python/Zope2/Startup etc.,
> but none for .../instance/Extensions.
> 
> I was hoping that I could get the path where 'Extensions' is because I
> work with several zope installations in several platforms and I would
> like to make my module independent of a variable inside its code that
> should be manually adjusted for every situation.
> 
> And yes, I am aware about adding the path only once (that's why
> there's a 'if') and then I avoid recursive insertions.

I don't know if it helps, but $INSTANCE_HOME/lib/python is going to be
on your path by default.  Personally, I would put the
module-to-be-imported there, rather than trying to hack sys.path.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF0fxD+gerLs4ltQ4RAhTVAKC6UCFmX/WPv1B2snREMTeoGEET4gCfaPIZ
O+ErLeWJIDZ5YIMkF7dtIF8=
=zSoJ
-----END PGP SIGNATURE-----



More information about the Zope mailing list