Esempio n. 1
0
    def __setitem__(self, key, value):
        if not isinstance(value, dict):
            raise TypeError("value is not a dictionary")

        for lkey in value.keys():
            if not isinstance(key, str):
                raise TypeError("key in group in not a string %s" % lkey)

        if sidex.sidex_HasGroup(self.__shandle, key):
            self.__delitem__(key)

        for lkey, lvalue in value.items():
            self.write_value(key, lkey, lvalue)
Esempio n. 2
0
 def has_key(self, name):
     return sidex.sidex_HasGroup(self.__shandle, name)
Esempio n. 3
0
 def __delitem__(self, key):
     if sidex.sidex_HasGroup(self.__shandle, key):
         sidex.sidex_DeleteGroup(self.__shandle, key)