Running ActivePython 2.1.0.210 on Windows 2000, I am trying to organize my
code using packages. The top directory is called Prism, located in the
Python21 directory, and two packages are "model" and "view".

C:\Python21\Prism
C:\Python21\Prism\model
C:\Python21\Prism\view

In the Python21 directory I have a PTH file named prism.pth with the
following lines:

Prism
Prism/model
Prism/view

This puts all three directories in the PYTHONPATH confirmed by
>>> import sys
>>> print sys.path

There is a test module in Prism/model called myfile.py, which I can import
with:

>>> import myfile
>>> print myfile.title
The Meaning of Life
>>>
but
>>> import model.myfile
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named model.myfile

Likewise for
>>> import prism.model.myfile

What crucial aspect of importing from packages do I not understand?


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to