On Sep 8, 2017, at 15:51, Noel O'Boyle <baoille...@gmail.com> wrote:
> 
> Hi all,
> 
> I'd like to capture error messages during SMILES parsing, but am having 
> trouble getting this to work.
  ...
> assert sio.read() != ""

That should be a sio.getvalue(). The read() starts from the current file 
position, which is at the end of the previous output.

(Or if you really want a read(), do sio.seek(0) first.)

Cheers,

                                Andrew
                                da...@dalkescientific.com



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to