objdictgen/node.py
changeset 239 f45fd4cd3832
parent 236 905677ed00f3
child 245 d43ebbed895f
equal deleted inserted replaced
238:be485a93e3f7 239:f45fd4cd3832
   812     """
   812     """
   813     def Print(self):
   813     def Print(self):
   814         listindex = self.Dictionary.keys()
   814         listindex = self.Dictionary.keys()
   815         listindex.sort()
   815         listindex.sort()
   816         for index in listindex:
   816         for index in listindex:
   817             print "%04X : %s"%(index, self.Dictionary[index])    
   817             values = self.Dictionary[index]
       
   818             if index != 0x1F22 and type(values) != IntType:
       
   819                 values = [i for i in values]
       
   820                 for i, value in enumerate(values):
       
   821                     if type(value) == IntType:
       
   822                         values[i] = "%X"%value
       
   823                 values = "[" + ",".join(values) + "]"
       
   824             print "%04X : %s"%(index, values)
   818 
   825 
   819     def CompileValue(self, value, index):
   826     def CompileValue(self, value, index):
   820         if type(value) == StringType and value.find("self.ID") != -1:
   827         if type(value) == StringType and value.find("self.ID") != -1:
   821             base = self.GetBaseIndex(index)
   828             base = self.GetBaseIndex(index)
   822             try:
   829             try: