[Zope] external method: importing and updating method

Alan alanwilter at gmail.com
Wed Oct 4 06:12:58 EDT 2006


Hi Folks,

Thanks for help. I did what suggested below. We also set a crontab to
restart the zope server every night, but them I was wondering if it is
a good idea.

Cheers,
Alan

On 03/10/06, Jonathan <dev101 at magma.ca> wrote:
>
> ----- Original Message -----
> From: "Dieter Maurer" <dieter at handshake.de>
> To: "Alan" <alanwilter at gmail.com>
> Cc: <zope at zope.org>
> Sent: Tuesday, October 03, 2006 2:06 PM
> Subject: Re: [Zope] external method: importing and updating method
>
>
> > Alan wrote at 2006-10-2 18:48 +0100:
> >>In my external method I have something like this:
> >>...
> >>sys.path.insert(0, CCPNPYTHON)
> >
> > This is not a good idea!
> >
> > The source of an "External Method" can be read arbitrarily often --
> > and each time, you extend "sys.path"...
>
> We get around this 'evergrowing' path problem by (if there is a problem with
> this solution let me know!):
>
> import sys
> SOMEPATH = '/some/path/goes/here'
> if SOMEPATH not in sys.path:
>     sys.path.append(SOMEPATH)
>
>
> Jonathan
>
>
>


-- 
Alan Wilter S. da Silva, D.Sc. - 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