From: Geoff H. <ge...@ge...> - 2005-06-13 20:21:07
|
On Jun 13, 2005, at 1:43 PM, S Joshua Swamidass wrote: > Let me point out I'm only familiar wiht python, not perl at all. So > everything i say here has that slant. That's fine. I think right now, there's more interest in Python wrappers than Perl. > One sticky issue in particular is the '>>' and '<<' methods of > ... Molecule input/output in openbable relies heavily on this > feaure. Not anymore. These are removed completely in the 2.0 development code. There are probably ways to bring them back, but honestly, it's nice to separate the conversion code completely from an OBMol. Even in earlier versions, the << and >> operators were not extensively used by internal code. > will allow open bable to read a molecule from any > file-emulating-object of the scripting target language, not just real > files (very important for python). It's already there. If you pass me a C++ iostream, then I'll hand it off to the new OBConversion framework and it'll go to work. I would assume that should handle most cases for Python, though I'll admit I haven't extensively looked at the new SWIG wrappers. > The other major problem i was stuck on was compiling the wrapper swig > produced. I never got to the bottom of which i couldn't. I can go back > and look again. In my (limited) experience, this is a sign swig > misunderstood some more complex uses of c++ syntax. No, it was a problem with the declarations for C replacement functions missing on some platforms. SWIG saw them in the OpenBabel namespace and had problems. First I updated the development version to use std:: so that SWIG would correctly ignore them. Now, they're out of mol.h entirely. Please take a look at the latest CVS snapshot on the openbabel-new- framework branch or the CVS development snapshot. There's even a SWIG openbabel.i file there. :-) At the very least, I can vouch that the wrapper compiles correctly. Cheers, -Geoff |