1.装置须要的库

pip install Gooey

2.导入须要的库

from gooey import Gooey, GooeyParser    

3.代码局部

@Gooey(    richtext_controls=True,    language='chinese',    header_show_title=False,    program_name="解决工具v1.0",    encoding="utf-8",     default_size=(650, 555),    progress_expr="current / total * 100",        # 再次执行,革除之前执行的日志    clear_before_run = True,    timing_options = {'show_time_remaining':True,'hide_time_remaining_on_complete':False}  )def main():    desc = "工具阐明:"+"\n"+"   "+"1.本工具仅作为xxx应用"    file_help_msg = "help...info"        my_cool_parser = GooeyParser(description=desc)          my_cool_parser.add_argument(option_strings=['-u', '--username'],dest='账号', widget="TextField")    my_cool_parser.add_argument(option_strings=['-p', '--password'],dest='明码', widget="TextField")    my_cool_parser.add_argument(option_strings=['-v', '--verify_number'],dest='验证码', widget="TextField")    my_cool_parser.add_argument(option_strings=['-f', '--file_path'], dest="待匹配文件门路", widget="FileChooser")        # 获取参数    args = my_cool_parser.parse_args()     print(args)     def here_is_more():    pass   

5.Demo