Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80277821
tamaas.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 30, 21:41
Size
1 KB
Mime Type
text/x-python
Expires
Sun, Sep 1, 21:41 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20221397
Attached To
rTAMAAS tamaas
tamaas.py
View Options
try
:
from
._tamaas
import
*
# Redefinition of model_type constants (for compatibility)
model_type_basic_1d
=
model_type
.
basic_1d
model_type_basic_2d
=
model_type
.
basic_2d
model_type_surface_1d
=
model_type
.
surface_1d
model_type_surface_2d
=
model_type
.
surface_2d
model_type_volume_1d
=
model_type
.
volume_1d
model_type_volume_2d
=
model_type
.
volume_2d
except
ImportError
as
e
:
print
(
"Error trying to import _tamaas:
\n
{}"
.
format
(
e
))
raise
e
class
ParamHelper
:
def
__init__
(
self
,
obj
):
self
.
obj
=
obj
def
set
(
self
,
params
):
for
key
in
params
:
setter_name
=
'set'
+
key
try
:
accessor
=
getattr
(
self
.
obj
,
setter_name
)
accessor
(
params
[
key
])
except
:
print
(
"Setter '{}({})' does not exist for object {}"
.
format
(
setter_name
,
type
(
params
[
key
]),
self
.
obj
))
Event Timeline
Log In to Comment