Imp.load_dynamic failing from the escripting console


Can the experts help me to solve the following mystery?.
I have a 3rd party lib, which I have installed in /var/lib/ignition/user-lib/pylib/ following the advices of the documentation. It is called which uses a also placed at the same area. The code of is just:
def bootstrap():
global bootstrap, loader, file
import sys, pkg_resources, imp
file = pkg_resources.resource_filename(name,‘’)
loader = None; del bootstrap, loader

BTW, I have not created it, I just deploy it because I want to use it for another things, and it has been used as it is by my community since years. So I use my python console in a linux machine and I just reproduce the code knowing exactly the placement of the lib:

$ python
Python 2.7.5 (default, Apr 2 2020, 13:16:51)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import sys,imp
<module ‘dimc’ from ‘/var/lib/ignition/user-lib/pylib/’>

I try the same from the script console in the designer:
Input Error: No module named dimc

What should I do to make this workable?.

Thanks in advance,

That is a C library. Java (and therefore jython) cannot load those. Java can only load .so or .dll files that follow the JNI standard and cooperate with a matching java .jar file.

Your solution was already stated in your PYTHONPATH topic by @Sanderd17 :

Jython runs in java, so you need to use DIM’s java library, not its python library. Nothing you do with python or library search paths will enable to load in java.

thanks, I stop it here. Thanks