Hi there RDKitters,

I have a theoretical/general cheminformatics question and a practical one.

In theory, which is better -- having a program which reads/writes
everything from stdin/stdout or having the said program read an input
file and spit out an output file.
Possibly these methods are equivalent, and from one you can do the
other (via redirection or use of /dev/stdout as file descriptor etc).
One problem I have with the stdin/stdout approach is that then I have
to log messages to a file instead of screen, as you do not want the
info message "20 molecules in file abc.sdf" to go out in your
molecules stream.   Which do you find the most usable/user friendly
approach?

To my practical question now (and I'd like this answered, if possible
irrespective of the above).   I would like to access the SDMolSupplier
(std::istream *inStream, ...) method - to feed the SDMolSupplier from
stdin (e.g. cat abc.sdf | myprog.py ) how do I go about doing that in
python; the following bit of code does not work:

suppl = Chem.SDMolSupplier(sys.stdin.readlines(), sanitize=False)

Thank you all, lovely people.

Jean-Paul Ebejer
Early Stage Researcher

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to