def _clipboard_changed(self, clipboard, event): text = clipboard.wait_for_text() text = text.encode("utf-8") print text if not text == self.__old: self.__old = text util.cls() del self.__suggestwords self.__suggestwords = [ word for word in self.suggest.suggestword(text)] print self.__suggestwords
def main(URL, loginid, loginpw): browser = preparewebdriver.prepare_webdriver() loginogame.login_ogame(browser, URL, loginid, loginpw) choice = 0 while choice != 8: util.cls() choice = input( "작업 입력\n1 : 정찰\n2 : 시간 대기\n3 : 정찰 내용을 Csv로 저장\n4 : 자동공격\n5 : 갤럭시툴\n8 : 종료\n--> " ) if int(choice) == 1: spionage.espionage(browser) if int(choice) == 2: util.wait_time() if int(choice) == 3: mailtocsv.mail_to_csv(browser) if int(choice) == 4: autoattack.auto_attack(browser) if int(choice) == 5: galaxytool.enter_galaxy_tab(browser) if int(choice) == 8: browser.quit() break
def watch(self, args): if not self.apiRequest.isTokenSet: print("Please set your token first! Use settoken CMD") sys.exit(1) coins = None try: while True: if coins is None or cnt == WATCH_REFRESH: cnt = 0 coins = self.apiRequest.request( coinIds=[str(row["id"]) for row in self.portfolio]) util.cls() self.printer.print(coins) self.printer.printTime(cnt) print("\r", end="") sleep(1) cnt += 1 except KeyboardInterrupt: print("\r\n\n Keyboard interrupt: Exiting...") sys.exit(0)
def refresh_screen(data): # clear screen cls() print data sys.stdout.flush()
import sys sys.path.append("ext") import webbrowser import os import util, calc, twitter from time import strftime util.cls() txt = raw_input("> ").lower() opt = util.cmd(txt) class Bot(): while "bye" not in opt: if "hi" in opt: print "Hi there! The time is " + strftime("%H:%M:%S") elif "today" in opt: print "Now is", strftime("%A, %d %b %Y %X") elif "irc" in opt: os.system("irssi") elif "thanks" in opt: print "You're welcome" elif "google" in opt: keyword = util.content(opt,"google") if len(keyword) >= 1: util.google(keyword) else: print "No input entered." elif "wiki" in opt: keyword = util.content(opt,"wiki") if len(keyword) >= 1: util.wiki(keyword)
def OgameTools(URL,loginid,loginpw): browser = preparewebdriver.prepare_webdriver() loginogame.login_ogame(browser,URL,loginid,loginpw) util.cls() galaxytool.enter_galaxy_tab(browser)