def __init__(self, worker, client): super(Lit, self).__init__() self.worker = worker self.client = client from go import Go from run import Run #from recent import Recent #from iciba import Iciba #from f import F #lit = Lit([Go(), Run(), Recent(), Iciba()]) plugins = [ Go(worker=worker, client=client), Run(worker=worker, client=client) ] lay = QVBoxLayout() # spacing of search box lay.setSpacing(0) lay.setMargin(0) self.inp = Input(self.act, self) self.inp.textChanged.connect(self._try_query) self.completer = Suggest(self.inp) #self.inp.setCompleter(self.completer) self.completer.activated[QModelIndex].connect(self.select) lay.addWidget(self.inp) self.setLayout(lay) self._install_plugins(plugins) self.setWindowFlags( Qt.FramelessWindowHint | Qt.Popup | Qt.WindowStaysOnTopHint ) self.setWindowTitle('lit') self.mutex = QMutex() self.jobs = []
data = {} rest_name = "" while True: rest_name = input() if (rest_name == "quit"): break rest = Restaurant(rest_name, user_city) res_id = rest.getRestaurantId() try: data[res_id] += 1 except: data[res_id] = 1 user.set_Data(data) #user.set_Data({'18424988': 1, '17317233': 1, '17317873': 1, '17317935': 1, '17317476': 1, '17317260': 1, '17318108': 1, '17317942': 1}) suggestor = Suggest() print("What type of restaurant suggestion would you like?") print("For a familiar suggestion, enter 1") print("For a less suggestion, enter 2") print("For a new suggestion, enter 2") choice = input() if (choice == 1): print(suggestor.familiar(user)) if (choice == 2): print(suggestor.less_familiar(user)) if (choice == 3): print(suggestor.completelynew(user)) else: print("Invalid Input")