Hello Andrew, (Questions on the API are best sent to the devel list or the scripting list.)
Getting Python/SWIG to handle streams is difficult. I haven't done it (contributions welcome here). I could add a convenience function ReadFromStdin(). However that would not solve the general problem, just your specific one. Can you describe the use case? Will look into the version question. I could try to set this in the Python interface if all else fails. - Noel On 23 January 2010 04:33, Andrew Dalke <[email protected]> wrote: > I'm trying to tell OBConversion to use std::cin as the input source. > > I'm using Python. > > That doesn't seem possible. > > Read() takes a std::istream*, but Python has no way to create that > and there's no special magic value like "openbabel.cin" which I > can use to force it. > > Instead, I end up doing a circumlocution to tell OB to read > from the file "/dev/stdin", which should work on the machines > I'm interested in, but does not work on Windows. > > > BTW, a related question. > > Is there any way to get the OB version information from Python? > BABEL_VERSION is a compile-time string, and I don't see any code > which makes that visible via SWIG. > > > Best regards, > > Andrew > [email protected] > > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > OpenBabel-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ OpenBabel-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
