module/import question

2005-02-28 Thread subopt
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 "", 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

-- 
http://mail.python.org/mailman/listinfo/python-list


Trouble loading dll via ctypes

2008-01-29 Thread subopt inTheVicinityOf geemail.com
I'm trying to load a dll via ctypes by doing this:

cdll.LoadLibrary('/path/to/mylib.so')

But i'm getting this:

/path/to/mylib.so: cannot open shared object file: No such file or
directory What am i doing wrong?

The dll in question is in a directory mounted via NSF, but no part of
the path/filename is a symlink. When i try code from the docs:

cdll.LoadLibrary('libc.so.6')

,then all is fine.

I've also tried to set my LD_LIBRARY_PATH before starting Python,
checking it via os.environ, then doing the cdll.LoadLibrary(...), but
that fails with the same complaint. What am i doing wrong?

tia,
Eric
-- 
http://mail.python.org/mailman/listinfo/python-list