def __init__(self): #intantiate classes self.config = self.getConfigs() self.database = database( os.path.join(self.getConfigPath(), 'database.db3')) self.screen = screen(self.config) self.rssworker = rss() self.screen.setWindowTitle("SimpleRSS") moveUpKeys = [KEY_UP, ord('k')] moveDownKeys = [KEY_DOWN, ord('j')] feedListReturnKeys = [ ord('q'), ord('h'), ord('r'), ord('R'), ord('a'), ord('A'), ord('u'), ord('U'), 10, ord('l'), ord('?') ] articleListReturnKeys = feedListReturnKeys + [ord('o')] try: self.mainloop(moveUpKeys, moveDownKeys, feedListReturnKeys, articleListReturnKeys) except Exception as e: self.screen.close() print("simpleRSS crashed:") traceback.print_exc() return
def __init__(self,debug = False): self.title = "SimpleRSS {0}".format(VERSION) #instantiate classes if (debug == True): self.logwriter = logWriter() else: self.logwriter = logWriter("/dev/null") self.config = self.getConfigs() self.database = database(os.path.join(self.getConfigPath(),'database.db3'), VERSION) self.screen = screen(self.config) self.rssworker = rss() self.screen.setWindowTitle(self.title); self.moveUpKeys = [KEY_UP,ord('k')] self.moveDownKeys = [KEY_DOWN,ord('j')] try: self.showFirstPage() except Exception as e: self.screen.close() print("simpleRSS crashed:") traceback.print_exc() self.screen.close() return
def __init__(self): #intantiate classes self.config = self.getConfigs() self.database = database(os.path.join(self.getConfigPath(),'database.db3')) self.screen = screen(self.config) self.rssworker = rss() self.screen.setWindowTitle("SimpleRSS"); moveUpKeys = [KEY_UP,ord('k')] moveDownKeys = [KEY_DOWN,ord('j')] feedListReturnKeys = [ord('q'), ord('h'), ord('r'), ord('R'), ord('a'), ord('A'), ord('u'), ord('U'), 10, ord('l'), ord('?')] articleListReturnKeys = feedListReturnKeys + [ord('o')] try: self.mainloop(moveUpKeys, moveDownKeys, feedListReturnKeys, articleListReturnKeys) except Exception as e: self.screen.close() print("simpleRSS crashed:") traceback.print_exc() return