microproduct/dem-sentiral/ISCEApp/site-packages/openbabel/__init__.py

20 lines
527 B
Python
Raw Normal View History

2023-08-28 10:17:29 +00:00
import sys
import warnings
from . import openbabel
__version__ = "3.1.1"
_thismodule = sys.modules[__name__]
class OBProxy(object):
def __getattr__(self, name):
if hasattr(_thismodule, name):
return getattr(_thismodule, name)
elif hasattr(openbabel, name):
warnings.warn('"import openbabel" is deprecated, instead use "from openbabel import openbabel"')
return getattr(openbabel, name)
else:
raise AttributeError
sys.modules[__name__] = OBProxy()