-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path__init__.py
More file actions
33 lines (26 loc) · 927 Bytes
/
__init__.py
File metadata and controls
33 lines (26 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from .base import BaseThinLayer
def _get_pysces():
global ThinLayerPysces
try:
from .psyces import ThinLayerPysces as _ThinLayerPysces
except ImportError as e:
raise ImportError(
f"ThinLayerPysces is not available because of missing dependencies: {e}"
)
return _ThinLayerPysces
def _get_copasi():
global ThinLayerCopasi
try:
from .basico import ThinLayerCopasi as _ThinLayerCopasi
except ImportError as e:
raise ImportError(
f"ThinLayerCopasi is not available because of missing dependencies: {e}"
)
return _ThinLayerCopasi
def __getattr__(name):
if name == "ThinLayerPysces":
return _get_pysces()
elif name == "ThinLayerCopasi":
return _get_copasi()
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
__all__ = ["BaseThinLayer", "ThinLayerPysces", "ThinLayerCopasi"]