module/import question

subopt_at_gmail.com
Date: 02/28/05


Date: 28 Feb 2005 10:49:08 -0800

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



Relevant Pages

  • Re: Pygtk but no gtk?
    ... the gtk module. ... I had the files stored in my local space and my PYTHONPATH was wrong. ... got pygtk in the first place coz it wasnt in PYTHONPATH the first time. ...
    (comp.lang.python)
  • Re: Python implementation of "include"
    ... that calls it accessible through PYTHONPATH, ... statement myFile.py would only run the first time through unless ... reloadis executed in the proper place. ... Gabriel Genellina ...
    (comp.lang.python)