Package schrodinger :: Package utils :: Module moduleproxy
[hide private]
[frames] | no frames]

Module moduleproxy

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.

Classes [hide private]
  ModuleProxy
A class to use as a placeholder for a non-essential module, raising an exception when something tries to use it.
Functions [hide private]
 
try_import(name)
Return the module named or a proxy that will raise an ImportError the first time any of its attributes are accessed.
Variables [hide private]
  __package__ = None
hash(x)
Function Details [hide private]

try_import(name)

 

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.