[Zope] External Method import problems

Fredrick Rybarczyk Fredrick.Rybarczyk@lub.lu.se
Wed, 22 Sep 1999 08:49:40 +0200


Mike Salib wrote:

Either add your extentions directory to your pythonpath or use
import sys
sys.path.append("/path/to/DateTime")
from DateTime import *

Be aware of that changes to your DateTime module will not propriagate to
the zope namespace so while developing it might be useful to do
something like
import sys
sys.path.append("/path/to/DateTime")
import DateTime
reload(DateTime)
to ensure that you get things right. I anyone has a better suggestion,
I'd like to hear about it :-)

Cheers, Fredrick

> I've been playing with Zope for a few days, and while I totally
> love it, I've got a weird problem. When I try to use external
> methods, not all of the module imports are available. For example,
> if I have a file MyLib.py which includes a "from DateTime import *",
> when I set up an external method from Zope, the code fails because it
> doesn't see the classes that I imported from the DateTime module.
>
> I think I'm missing something incredibly obvious, can anyone
> point it out?
>
> Thanks a lot!
>
> --
> "One World, One Web, One Program" - Microsoft Promotional Ad
> "Ein Volk, Ein Reich, Ein Fuhrer" - Adolf Hitler
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
>
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )

--
_____________________________________________________
Fredrick Rybarczyk  voice +46 46 222 9369
Research Engineer   fax   +46 46 222 3682
LUB NetLab          http://www.lub.lu.se/~fredrick/