Hi -
I would like to write a plugin using python-wrapped c++ classes - i have a *.so (shared object file) written with python bindings, as in:
http://docs.python.org/api/api.html
i am able to import and use my python-wrapped c functions within a python 2.3 interpreter. If I try to run the same commands from the pymol command line (or as a plugin) i get the error:

PyMOL>from SparseEnergyTable import SparseEnergyTable
PyMOL>energytable = SparseEnergyTable()
Traceback (most recent call last):
  File "/home/kimf/pymol/modules/pymol/parser.py", line 255, in parse
    exec(com2[nest]+"\n",pymol_names,pymol_names)
  File "<string>", line 1, in ?
  File "/home/kimf/pymol/modules/pymol/SparseEnergyTable.py", line 7, in 
__init__
    from PySparseEnergyTable import new_SparseEnergyTable
ImportError: /home/kimf/pymol/modules/pymol/PySparseEnergyTable.so: undefined 
symbol: PyType_Type

i.e. pymol seems to be having trouble with the *.so file? is it possible to use python-wrapped c++ classes from within pymol?
Thanks!
Kim Reynolds
Handel Lab
UC Berkeley

Reply via email to