How to stringfy a swig matrix object in python
问题 I am using swig wrapper of openbabel (written in C++, and supply a python wrapper through swig) Below i just use it to read a molecule structure file and get the unitcell property of it. import pybel for molecule in pybel.readfile('pdb','./test.pdb'): unitcell = molecule.unitcell print unitcell |..> |..> <openbabel.OBUnitCell; proxy of <Swig Object of type 'OpenBabel::OBUnitCell *' at 0x17b390c0> > The unitcell has function CellMatrix(), unitcell.GetCellMatrix() <22> <openbabel.matrix3x3;