orthonym.rdkit_log#
Note
Internal API. Names and behaviour may change between releases.
Switch RDKit’s own log streams off (or on) for a block of code and put them back as they were.
RDKit writes its warnings (Omitted undefined stereo, Proton(s) added/removed) and
errors (Can't kekulize mol, SMILES Parse Error) to the error stream from C++, outside
Python’s logging. RDLogger.EnableLog afterwards turns a stream ON whatever state it had
before, so a block that changed a stream must restore the previous state, not enable it.
- orthonym.rdkit_log.rdkit_logs_off(*streams)#
Disable the named RDKit streams (
"rdApp.warning", or"rdApp.*"for all) inside the block; on exit each stream is back in the state it had before.
- orthonym.rdkit_log.rdkit_logs_on(*streams)#
Enable the named RDKit streams inside the block (for the one RDKit message that is about the user’s own input); on exit each stream is back in the state it had before.