def main(self, pytopo_args): """main execution routine for pytopo.""" self.exec_config_file() # Remember how many known sites we got from the config file; # the rest are read in from saved sites and may need to be re-saved. self.first_saved_site = len(self.KnownSites) self.read_saved_sites() self.read_tracks() gc.enable() mapwin = MapWindow(self) self.parse_args(mapwin, pytopo_args) # For cProfile testing, run with a dummy collection (no data needed): # mapwin.collection = MapCollection("dummy", "/tmp") # print cProfile.__file__ # cProfile.run('mapwin.show_window()', 'cprof.out') # http://docs.python.org/library/profile.html # To analyze cprof.out output, do this: # import pstats # p = pstats.Stats('fooprof') # p.sort_stats('time').print_stats(20) mapwin.show_window(self.init_width, self.init_height)
def main(self, pytopo_args): """main execution routine for pytopo.""" self.exec_config_file() # Remember how many known sites we got from the config file; # the rest are read in from saved sites and may need to be re-saved. self.first_saved_site = len(self.KnownSites) # Now it's safe to read the saved sites. self.read_saved_sites() self.read_tracks() gc.enable() mapwin = MapWindow(self) try: self.parse_args(mapwin, pytopo_args) except ArgParseException: # Didn't match any known run mode: # start in selector mode to choose a location: if not mapwin.selection_window(): sys.exit(0) # For cProfile testing, run with a dummy collection (no data needed): # mapwin.collection = MapCollection("dummy", "/tmp") # print(cProfile.__file__) # cProfile.run('mapwin.show_window()', 'cprof.out') # http://docs.python.org/library/profile.html # To analyze cprof.out output, do this: # import pstats # p = pstats.Stats('fooprof') # p.sort_stats('time').print_stats(20) mapwin.show_window(self.init_width, self.init_height)