[Zope] External Method importing modules

Alan alanwilter at gmail.com
Tue Feb 13 08:10:17 EST 2007


Thanks Andreas, I am trying with:

if sys.path.count(myPath) == 0: sys.path.insert(0, myPath)

where myPath should be '[Zope installation folder]/instance/import'.
So my question now is: is there a variable inside Zope which can
returns the 'import' path?

Many thanks in advance.

Cheers,
Alan

On 13/02/07, Andreas Jung <lists at zopyx.com> wrote:
>
>
> --On 13. Februar 2007 12:53:25 +0000 Alan <alanwilter at gmail.com> wrote:
>
> > Dear List,
> >
> > I have an external method and now I developed I new module in a
> > separated file and then I am trying to make my external method to
> > import it but I am failing here. Where should place my module file in
> > order to be found by my external method?
> > I tried to place it in the same folder of my external method, but no
> > success.
>
> Since the module must be importable, it must be available in some location
> as defined through sys.path or $PYTHONPATH. Check the Python docs for
> additional info on that topic.
>
> -aj
>


-- 
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
>>http://www.bio.cam.ac.uk/~awd28<<


More information about the Zope mailing list