Hi, I’m trying to use Jython to interface with a not so recent software (2003) wrote on C++ and a Python API wrapping it (Evolution ERSP 2.0). When I use the current version of Python or Jython, it doesn’t work, as it always fails to load a Python extension provided as a dll (_libevoctask.dll):

 

>>> import ersp.task

File "<pyshell#0>", line 1, in <module>

  import ersp.task

File "c:\ERSP\python\ersp\task.py", line 13, in ?

ImportError: no module named _libevoctask

 

Where        task.py", line 13

contains     from _libevoctask import *

 

(the error message is exactly the same for both Python implementations)

 

I suppose the way Python extension modules must be coded has changed since 2003.

So the problem is solved by using an older version of Python (2.2 works); I can use the classes implemented in the extension file _libevoctask.dll.

But… with an old Jython (2.1) I find a different error, quite estrange:

 

>>> import ersp.task

File "<pyshell#0>", line 1, in <module>

  import ersp.task

File "c:\ERSP\python\ersp\task.py", line 13, in ?

ImportError: no module named _libevoctask

 

(same error)

 

Second invocation:

 

>>> import ersp.task

 

(no error!!!)

 

But then I cannot import the classes implemented in the extension file _libevoctask.dll.

 

>>> import ersp.task

>>> import ersp.task.util

Traceback (innermost last):

  File "<console>", line 1, in ?

ImportError: No module named util

 

>>> import ersp.task.speech

Traceback (innermost last):

  File "<console>", line 1, in ?

ImportError: No module named speech

 

Of course I have added path c:\ERSP\python\ to the python.path registry property.

Any insight is really welcomed; I’m really stuck. Thanks!