Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91767508
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
Thu, Nov 14, 06:36
Size
1 KB
Mime Type
text/x-python
Expires
Sat, Nov 16, 06:36 (2 d)
Engine
blob
Format
Raw Data
Handle
22321443
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