[Zope] Import Problems - What am I doing wrong?

Bill Hewitt wphewitt at comcast.net
Fri Sep 10 22:45:42 EDT 2004


I have two Python Products, Virtual_site and Virtual_Misc in the
lib/python/Products directory....

In Virtual_Site,  I have a Python module called Campus and inside it, I
have a Class called Campus.....

In Virtual_Misc, I have a Python module called Misc and inside it, I
have a Class called Misc and several methods..... 

I have been trying to import the methods from Virtual_Misc.Misc into
Virtual_Site.Campus - but everytime I try to import I get an error....

I have tried putting the following into the module Virtual_Site.Campus:

import Misc

and

from Virtual_Misc import Misc

and 

from Virtual_Misc.Misc import Misc

and 

import Virtual_Misc.Misc.Misc

None of these work and I get an error....

So I tried to put the import statement into __init__.py - again no
luck.....

This is very frustrating to me and obviously I am missing something - IF
someone out there can enlighten me, I would greatly appreciate it...

TIA 

WPH



More information about the Zope mailing list