module/import question

subopt at gmail.com subopt at gmail.com
Mon Feb 28 13:49:08 EST 2005


I'm trying to import Logilab's constraint module like this:

    from logilab.constraint import *

from within a Python interactive session. The module is not installed
correctly on our system, and it won't be, so i adjusted my PYTHONPATH,
added an empty __init__.py file, then started up an interactive
session.
When i do the above import i get:

    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
      File "/afs/big/long/freakin/path/to/dl/__init__.py",line 23,in ?

    ImportError: No module named constraint.propagation

the first time i do it, then the 2nd time it succeeds w/o a complaint.
The adjustment to my PYTHONPATH var was to append :

    afs/big/long/freakin/path/to/dl

to the previous value. Any idea what i'm doing wrong?

thanks in advance,
E




More information about the Python-list mailing list