def main(): usage = "用法: %prog -f <filename> | -u <domain>" parser = OptionParser(usage=usage) # 若输入错误,则输出提示usage parser.add_option("-u", "--target", type="string", dest="domain", help="python MmpScan -u baidu.com") parser.add_option("-f", "--file", type="string", dest="filename", help="python MmpScan -f domains.txt") (options, args) = parser.parse_args() __targets_list = GetTarget(options, args).start() base.start(__targets_list)
robot.get_light(), robot.get_temperature(), robot.get_battery(), robot.get_io_mode(0), robot.get_io_mode(1), robot.get_port(0), robot.get_port(1), robot.get_linetracer_state() ).strip() #print(string) time.sleep(0.1) def runCursesUI(scr): global string scr.nodelay(True) scr.clear() while True: scr.getch() curses.flushinp() scr.clear() scr.addstr(string) time.sleep(0.1) def startUI(): curses.wrapper(runCursesUI) Thread(target=startUI).start() start(periodicFunc)
def openFile(): location = askopenfilename(initialdir="/home/jo/Desktop", title="Select image for metadata extraction", filetypes=(("Image Files", "*.jpg"), ("Image Files", "*.png"))) base.start(location)