Class _StructureProperty
UserDict.DictMixin --+
|
_StructureProperty
Dictionary-like container of Structure based properties, with all dict
methods. Properties can be accessed via the m2io dataname as it appears
in the maestro file.
Property names must be m2io data names, which are in the format
'<type>_<author>_<property_name>', where '<type>'
is a data type prefix, '<author>' is a source specification, and
'<property_name>' is the actual name of the data.
The data type prefix can specified as 's' for string, 'i' for integer,
'r' for real and 'b' for boolean. The author specification should be
'user' for user created properties. The property name can have embedded
underscores.
Some example m2io datanames are 'r_m_x_coord', which indicates a real
maestro property named 'x coord', and 'i_user_my_count' which indicates
an integer user property named 'my count'.
To convert to the _StructureProperty to a real dictionary:
d = dict(st.property)
To set all properties from dictionary:
st.property = {...}
|
__init__(self,
st,
read_only=False)
Create an instance of the property 'dictionary' The instance is
created when st.property is first used. |
|
|
|
__getitem__(self,
item)
Return an item from the unrequested or additional data handle. |
|
|
|
__delitem__(self,
item)
Delete an item from the additional and unrequested data handle. |
|
|
|
__setitem__(self,
item,
value)
Set the item into the additional data handle. |
|
|
|
keys(self)
Return a list of the names of all properties. |
|
|
|
clear(self)
Clear all properties (except the title). |
|
|
Inherited from UserDict.DictMixin :
__cmp__ ,
__contains__ ,
__iter__ ,
__len__ ,
__repr__ ,
get ,
has_key ,
items ,
iteritems ,
iterkeys ,
itervalues ,
pop ,
popitem ,
setdefault ,
update ,
values
|
__init__(self,
st,
read_only=False)
(Constructor)
|
|
Create an instance of the property 'dictionary' The instance is
created when st.property is first used. If read-only is True then only
read-access will be supported.
|
__getitem__(self,
item)
(Indexing operator)
|
|
Return an item from the unrequested or additional data handle. Usage:
value = st.property[<name>]
|
__delitem__(self,
item)
(Index deletion operator)
|
|
Delete an item from the additional and unrequested data handle. Usage:
del st.property[<name>]
|
__setitem__(self,
item,
value)
(Index assignment operator)
|
|
Set the item into the additional data handle. Usage:
st.property[<name>] = value
|
Clear all properties (except the title).
- Overrides:
UserDict.DictMixin.clear
|