def main(self): self.ccnxChatClient = CCNxChatClient(lciPrefix, userName) self.lastSeqNumSeen = 0 self.chatForm = ChatForm(self.ccnxChatClient, self.userName, "%s" % (self.lciPrefix)) self.ccnxChatClient.enable_periodic_sync(2) self.chatForm.edit()
class ChatApp(npyscreen.NPSApp): def __init__(self, lciPrefix, userName): super(npyscreen.NPSApp, self).__init__() self.ccnxChatClient = CCNxChatClient(lciPrefix, userName) self.userName = userName self.lciPrefix = lciPrefix def main(self): self.ccnxChatClient = CCNxChatClient(lciPrefix, userName) self.lastSeqNumSeen = 0 self.chatForm = ChatForm(self.ccnxChatClient, self.userName, "%s" % (self.lciPrefix)) self.ccnxChatClient.enable_periodic_sync(2) self.chatForm.edit()
def __init__(self, lciPrefix, userName): super(npyscreen.NPSApp, self).__init__() self.ccnxChatClient = CCNxChatClient(lciPrefix, userName) self.userName = userName self.lciPrefix = lciPrefix