spacepy.pycdf.zAttr¶
- class spacepy.pycdf.zAttr(cdf_file, attr_name, create=False)[source]¶
zAttribute for zVariables within a CDF.
Warning
Because zAttributes are shared across all variables in a CDF, directly manipulating them may have unexpected consequences. It is safest to operate on zEntries via
zAttrList
.Note
When accessing a zAttr, pyCDF exposes only the zEntry corresponding to the associated zVariable.
See also
- __init__(cdf_file, attr_name, create=False)¶
Initialize this attribute
- Parameters:
- cdf_file
CDF
CDF file containing this attribute
- attr_namestr
Name of this attribute
- createbool
True to create attribute, False to look up existing
- cdf_file
Methods
append
(index, data)Add entry to end of attribute list
insert
(index, data)Insert entry at particular index number
Attributes
- append(index, data)[source]¶
Add entry to end of attribute list
Since there can only be one zEntry per zAttr, this cannot be implemented.
- Raises:
- NotImplementedErroralways
- insert(index, data)[source]¶
Insert entry at particular index number
Since there can only be one zEntry per zAttr, this cannot be implemented.
- Raises:
- NotImplementedErroralways
- ATTR_MAXENTRY_ = c_long(93)¶
- ATTR_NUMENTRIES_ = c_long(94)¶
- ENTRY_ = c_long(109)¶
- ENTRY_DATASPEC_ = c_long(114)¶
- ENTRY_DATATYPE_ = c_long(112)¶
- ENTRY_DATA_ = c_long(115)¶
- ENTRY_EXISTENCE_ = c_long(111)¶
- ENTRY_NUMELEMS_ = c_long(113)¶
- SCOPE = c_long(2)¶