schrodinger.utils.moduleproxy module
A module proxy class to be used when a non-essential module can’t be
imported. It will raise an ImportError any time something from the module is
accessed.
-
schrodinger.utils.moduleproxy.
try_import
(name)[source]
Return the module named or a proxy that will raise an ImportError the
first time any of its attributes are accessed.
This allows for a non-essential module to be imported and mostly ignored
if not present.
-
class
schrodinger.utils.moduleproxy.
ModuleProxy
(name)[source]
Bases: object
A class to use as a placeholder for a non-essential module, raising an
exception when something tries to use it.
-
__init__
(name)[source]
Initialize self. See help(type(self)) for accurate signature.