def __init__(self,board): self.show_question = True self.board = board self.question_interface, root = gui.initializeGUI(self) self.board_interface = self.question_interface.status_board self.round = 1 self.players = [] self.engine = pyttsx.init() self.engine.setProperty("rate",140) self.last_correct_player = None for i,player_name in enumerate(getPlayerNames()): self.players.append(Player(player_name,i)) self.board_interface.setPlayers([p.name for p in self.players]) for player in self.players: self.board_interface.paintScore(player.name,player.score) self.paintRound(1) self.showQuestion() gui.startGUI(root)
print bibids[bibid] progress_bar_object, root = gui.showProgress(len(bibids)) processBIBIDs(bibids, start_time, fix_records, progress_bar_object, read_file, output_folder) #From the command line you can either run the GUI or skip that and run the whole thing from the command line. The GUI is just # used for selecting the inputs. Either way we end up feeding 3 pieces of information to launch the program: # -The input file, a csv that comes from running one of the queries # -The output folder, where we want the results to be written to # -fix_records, if this value is true the full process is run and the records are fixed, if it's false the voyager records # are retrieved without being fixed. Default as true if len(sys.argv) >= 2 and '.csv' in sys.argv[1]: if len(sys.argv) == 3: startup(input_file=sys.argv[1], output_folder=sys.argv[2]) elif len(sys.argv) == 4: if sys.argv[3] == '-nofix': startup(input_file=sys.argv[1], output_folder=sys.argv[2], fix_records=False) else: startup(input_file=sys.argv[1], output_folder=sys.argv[2]) else: startup() else: file, folder, fix_records_boolean, root = gui.startGUI() root.destroy() startup(input_file=file, output_folder=folder, fix_records=fix_records_boolean)
#!/usr/bin/env python import rospy import constants import gui from gui.pathFinder.pathFindViewer import PathFindViewer import rh_pathfinding.msg as pfm from ros.rosPathFinderInterface import RosPathFinderInterface if __name__ == '__main__': rospy.init_node("pathFinderDebug", anonymous=True) pathFinderInterface = RosPathFinderInterface(pfm.GPSCoord(constants.CANBERRA_GPS[0], constants.CANBERRA_GPS[1])) PathFindViewer(pathFinderInterface, 800, 800) gui.startGUI()
import gui import fetcher import parser_page def onUrl(url): page_fetcher = fetcher.getPage(url) page_parser = parser_page.getParser(page_fetcher) keyworwds = parser_page.getKeywords(page_parser) if keyworwds is not False: statistics = parser_page.getStats(page_parser, keyworwds) else: statistics = "Page does not contain keywords" return statistics gui.startGUI(onUrl)