Esempio n. 1
0
 def __getitem__(self, key):
     lkey = sidex.variant.sdx_to_py(key)
     if sidex.sidex_HasKey(self.__sdxdoc.shandle, self.__grpname, lkey):
         if self.__sdxdoc.autocast:
             return sidex.variant.sdx_to_py(self.__sdxdoc.read_value(self.__grpname, lkey))
         else:
             return self.__sdxdoc.read_value(self.__grpname, lkey)
     else:
         raise KeyError("invalid key %s" % lkey)
Esempio n. 2
0
 def has_key(self, name):
     return sidex.sidex_HasKey(self.__sdxdoc.shandle, self.__grpname, sidex.variant.sdx_to_py(name))
Esempio n. 3
0
 def __delitem__(self, key):
     lkey = sidex.variant.sdx_to_py(key)
     if sidex.sidex_HasKey(self.__sdxdoc.shandle, self.__grpname, lkey):
         sidex.sidex_DeleteKey(self.__sdxdoc.shandle, self.__grpname, lkey)