def main(): util = Util() if util.options['run']: if util.options['config']: print("Enter in configuration mode") frontend = Frontend(config_mode=True, util_param = util) elif util.options['scan_roms']: print("Scan new roms") # util.scan_roms() frontend = Frontend(config_mode=False, util_param = util) else: frontend = Frontend(config_mode=False, util_param = util) frontend.save_current_mode() if util.options['shutdown_on_exit']: os.system(util.options['shutdown_command'])
def __init__(self, choices, backend): Frontend.__init__(self, backend) self.choices = choices self.pages = [] self.current_page = 0 self.previous_page = 0 self.gui_page = None # initiate all the page classes to objects for page_class in self.page_classes: self.pages.append(page_class(self)) # add all of the pages into the steps notebook self.steps = self.builder.get_object("steps") for page in self.pages: self.gui_load_page(page) page.load_page() self.set_page(0)
def main(): util = Util() if util.options['run']: if util.options['config']: print("Enter in configuration mode") frontend = Frontend(config_mode=True, util_param=util) elif util.options['scan_roms']: print("Scan new roms") # util.scan_roms() frontend = Frontend(config_mode=False, util_param=util) else: frontend = Frontend(config_mode=False, util_param=util) frontend.save_current_mode() if util.options['shutdown_on_exit']: os.system(util.options['shutdown_command'])
def main(): print "Loading GEM version 0.1. This might take ten seconds..." app = Frontend() print "loaded" app.mainloop()
from AnnualTemperature import AnnualTemperature from DataBase import Database from Frontend import Frontend if __name__ == "__main__": at = AnnualTemperature() data = at.openfile('Temperature.html') dt = Database() dt.createTable() for items in data: if len(items) > 0 and int(items[0]) > 1959 and int(items[0]) < 2019: dt.create(items[0], items[2]) frontend = Frontend() data = dt.get_all() x = [] y = [] for row in data: x.append(row[0]) y.append(row[1]) frontend.selectgraph(x, y) dt.delete_all_rows()