views:

8

answers:

0

Does anyone know this?

ncm-xen1:/usr/lib64/python2.6/site-packages # ls libvirt*
libvirtmod.so  libvirt.py  libvirt.pyc  libvirt$py.class


ncm-xen1:/opt/jython2.5.1 # ./jython 
Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54) 
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_14
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.append('/usr/lib64/python2.6/site-packages/')
>>> import libvirtmod                                     
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named libvirtmod
>>> import libvirt                                        
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 12, in <module>
    import cygvirtmod as libvirtmod
ImportError: No module named cygvirtmod
>>> 

How to load the libvirtmod.so in jython? Can libraries built for python be run on jython without modifications?

Thanks!