[Zope] External modules and import
Peter Eis
eis at hagen-partner.de
Tue Feb 24 15:59:34 EST 2004
On Tue, Feb 24, 2004 at 01:16:19PM -0700, Joe Goldthwaite wrote:
> Well that's the strange thing, I don't have a PYTHONPATH environment
> variable defined. Zope must have it's own PYTHONPATH defined somewhere but
> I haven't been able to find it. If I could find it, I'd just add my
> development directory to the path statement. I'm running Windows by the way.
> I don't know if that affects the answer.
I didn't pay attention to the used OS in the first place.
On windows you could try to add the modules path by editing the
zope.conf file (e.g. C:\Zope-Instance\etc\zope.conf)
If that doesn't work you should hav a look in your C:\Zope-Instance\bin
folder. The file runzope defines a PYTHONPATH variable.
I just checkt with version 2.7.0 so I don't know if it's the same on
2.6.x.
Peter
>
> -----Original Message-----
> From: Peter Eis [mailto:eis at hagen-partner.de]
> Sent: Tuesday, February 24, 2004 1:05 PM
> To: Joe Goldthwaite
> Subject: Re: [Zope] External modules and import
>
>
> On Mon, Feb 23, 2004 at 02:58:24PM -0700, Joe Goldthwaite wrote:
> >
> > I tried moving one simple class to a separate module called BarsDB. I
> then
> > added a line "import BarsDB" to the top of the Externals.py module. I'm
> > using Visual Python as my editor/debugger. Everything works fine from
> there
> > but when I try to reload my external method (Externals.py), I get this
> error
> > message;
> >
> > ImportError: No module named BarsDB
> >
> > Where do you define the Pythonpath for Zope?
>
> one simle way to achive this is to edit the start script.
> add the line:
> export PYTHONPATH=$PYTHONPATH:./Extensions
> somewhere before the exec command.
>
> Still I'm curious if there are better ways to do this.
>
> Peter
>
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
--
_______________________________
Dr. Hagen&Partner GmbH
Am Weichselgarten 7
91058 Erlangen
Tel: (0049)9131/691-330
Fax: (0049)9131/691-248
_______________________________
More information about the Zope
mailing list