rdkit.rdBase module

Module containing basic definitions for wrapped C++ code

class rdkit.rdBase.BlockLogs(self)

Bases: object

Temporarily block logs from outputting while this instance is in scope.

class rdkit.rdBase.CaptureErrorLog(self)

Bases: object

Captures messages from rdErrorLog while this instance is in scope. Can be used as a context manager. The messages property is accessible both inside the context and after it exits. Nesting is supported: inner captures shadow outer ones.

Example:

with rdBase.CaptureErrorLog() as capture:
    rdkit_function_that_may_fail()
print(capture.messages)
property messages

Messages captured from rdErrorLog.

exception rdkit.rdBase.IndexErrorException

Bases: IndexError

exception rdkit.rdBase.ValueErrorException

Bases: ValueError