def setData(self, itemName, value): try: self.items[itemName].SetData(str(value)) except KeyError: if itemName not in self.items: self.items[itemName] = dde.CreateStringItem(itemName) # self.items[itemName] = dde.CreateStringItem(itemName) self.topic.AddItem(self.items[itemName]) self.items[itemName].SetData(str(value).encode())
def __init__(self, topicName): topic = dde.CreateTopic(topicName) topic.AddItem(dde.CreateStringItem("")) object.Object.__init__(self, topic)
def __init__(self, handler, target): target.AddItem(dde.CreateStringItem("")) HandlerObject.__init__(self, handler, target)
def __init__(self, parent): self.parent = parent topic = dde.CreateTopic(self.parent.topic_name) topic.AddItem(dde.CreateStringItem("")) pywin.mfc.object.Object.__init__(self, topic)