第三方GUI库

编程入门 行业动态 更新时间:2024-10-24 18:22:54

<a href=https://www.elefans.com/category/jswz/34/1770258.html style=第三方GUI库"/>

第三方GUI库

Python 第三方GUI库- gooey


from gooey import Gooey
from gooey import GooeyParser@Gooey(program_name="BattCommunicate_GUI", language="chinese")
def gui_main():parser = GooeyParser(description="BattCommunicate_GUI")sublist_parser = parser.add_subparsers(dest="RESULT")  # 创建一个可生成多 parser的 subparsers对象prs1 = sublist_parser.add_parser("test_result")  # 第一个子parserprs1.add_argument("end_result", widget="Dropdown", metavar="测试结果", choices=["PASS", "FAIL"])subparser2 = sublist_parser.add_parser("test_time")  # 第二个子parsersubparser2.add_argument("times_d", metavar="测试时间", widget="Dropdown", choices=[">100s", ">200s"],default=">100s")prs2 = sublist_parser.add_parser('员工记录')prs2.add_argument("date",widget='DateChooser')prs2.add_argument('Dropdown',widget='Dropdown',choices=['A','B','C'],default='C')prs2.add_argument('dir', widget="FilterableDropdown", help="下载路径")args = parser.parse_args()# if args.Dropdown == 'A':#     temp01= ['AA','AB','BC']# else:# temp01= ['BB','BC','BD']# prs2.dir(choices= temp01)print(args)if args.RESULT == "test_time":  # 判断是执行哪个parserif args.times_d == ">100s":  # 判断parser下参数输出print(">>> 测试时间 大于100s")else:print(">>> 测试时间 大于200s")if args.RESULT == "timest_result":if args.end_result == "PASS":print(">>> 测试成功~!")else:print(">>> ERROR: 测试失败~")if args.RESULT == "员工记录":print(args.date)print(args.Dropdown)if __name__ == '__main__':gui_main()

def Gooey(f=None,
advanced=True,
language=‘english’,
auto_start=False, # TODO: add this to the docs. Used to be show_config=True
target=None,
program_name=None,
program_description=None,
default_size=(610, 530),
use_legacy_titles=True,
required_cols=2,
optional_cols=2,
dump_build_config=False,
load_build_config=None,
monospace_display=False, # TODO: add this to the docs
image_dir=‘::gooey/default’,
language_dir=getResourcePath(‘languages’),
progress_regex=None, # TODO: add this to the docs
progress_expr=None, # TODO: add this to the docs
hide_progress_msg=False, # TODO: add this to the docs
disable_progress_bar_animation=False,
disable_stop_button=False,
group_by_type=True,
header_height=80,
navigation=‘SIDEBAR’, # TODO: add this to the docs
tabbed_groups=False,
use_cmd_args=False,
**kwargs):
defaults = {
‘advanced’: True,
‘language’: ‘english’,
‘auto_start’: False, # TODO: add this to the docs. Used to be show_config=True
‘target’: None,
‘program_name’: None,
‘program_description’: None,
‘default_size’: (610, 530),
‘use_legacy_titles’: True,
‘required_cols’: 2,
‘optional_cols’: 2,
‘dump_build_config’: False,
‘load_build_config’: None,
‘monospace_display’: False, # TODO: add this to the docs
‘image_dir’: ‘::gooey/default’,
‘language_dir’: getResourcePath(‘languages’),
‘progress_regex’: None, # TODO: add this to the docs
‘progress_expr’: None, # TODO: add this to the docs
‘hide_progress_msg’: False, # TODO: add this to the docs
‘disable_progress_bar_animation’: False,
‘disable_stop_button’: False,
‘group_by_type’: True,
‘header_height’: 80,
‘navigation’: ‘SIDEBAR’, # TODO: add this to the docs
‘tabbed_groups’: False,
‘use_cmd_args’: False,
‘timing_options’: {
‘show_time_remaining’: False,
‘hide_time_remaining_on_complete’: True
}
}

更多推荐

第三方GUI库

本文发布于:2024-03-13 02:00:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1732932.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:第三方   GUI

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!