在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → Gooey: 将(几乎)任何Python命令行程序转换为完整的GUI应用程序,只需一行代码

Gooey: 将(几乎)任何Python命令行程序转换为完整的GUI应用程序,只需一行代码

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:0.69M
  • 下载次数:0
  • 浏览次数:48
  • 发布时间:2024-06-04
  • 实例类别:一般编程问题
  • 发 布 人:chenxiaolan
  • 文件格式:.zip
  • 所需积分:2
 相关标签:

实例介绍

【实例简介】

安装说明

通过pip是安装Gooey的最简单方式:

pip install Gooey

另外,您也可以通过克隆项目到本地目录来安装Gooey:

git clone https://github.com/chriskiehl/Gooey.git

然后运行setup.py:

python setup.py install

使用

Gooey通过在包含argparse声明的方法上添加简单的装饰器即可与代码关联(通常是主方法)。

from gooey import Gooey

@Gooey <--- 就是这么简单! :)

def main():

parser = ArgumentParser(...)

# 其余代码

通过传递参数到装饰器,可以配置不同的样式和功能。


【实例截图】
【核心代码】
文件清单
└── Gooey-be4b11b8f27f500e7326711641755ad44576d408
    ├── CONTRIBUTING.md
    ├── docs
    │   ├── Gooey-Options.md
    │   ├── Gracefully-Stopping.md
    │   ├── packaging
    │   │   ├── build-osx.spec
    │   │   ├── build-win.spec
    │   │   ├── Packaging-Custom-Images.md
    │   │   └── Packaging-Gooey.md
    │   ├── pull_request_template.md
    │   ├── releases
    │   │   ├── 1.0.3-release-notes.md
    │   │   ├── 1.0.4-release-notes.md
    │   │   ├── 1.0.5-release-notes.md
    │   │   ├── 1.0.6-release-notes.md
    │   │   ├── 1.0.7-release-notes.md
    │   │   ├── 1.0.8.1-release-notes.md
    │   │   ├── 1.0.8-release-notes.md
    │   │   ├── 1.2.0-ALPHA-release-notes.md
    │   │   ├── pypi-distribution.md
    │   │   └── release-checklist.md
    │   └── Using-Richtext-Controls.md
    ├── gooey
    │   ├── gui
    │   │   ├── application
    │   │   │   ├── application.py
    │   │   │   ├── components.py
    │   │   │   └── __init__.py
    │   │   ├── bootstrap.py
    │   │   ├── cli.py
    │   │   ├── components
    │   │   │   ├── config.py
    │   │   │   ├── console.py
    │   │   │   ├── dialogs.py
    │   │   │   ├── filtering
    │   │   │   │   ├── __init__.py
    │   │   │   │   └── prefix_filter.py
    │   │   │   ├── footer.py
    │   │   │   ├── header.py
    │   │   │   ├── __init__.py
    │   │   │   ├── layouts
    │   │   │   │   ├── __init__.py
    │   │   │   │   └── layouts.py
    │   │   │   ├── menubar.py
    │   │   │   ├── modals.py
    │   │   │   ├── mouse.py
    │   │   │   ├── options
    │   │   │   │   ├── __init__.py
    │   │   │   │   ├── options.py
    │   │   │   │   └── validators.py
    │   │   │   ├── sidebar.py
    │   │   │   ├── tabbar.py
    │   │   │   ├── util
    │   │   │   │   ├── __init__.py
    │   │   │   │   └── wrapped_static_text.py
    │   │   │   └── widgets
    │   │   │       ├── bases.py
    │   │   │       ├── basictextconsole.py
    │   │   │       ├── checkbox.py
    │   │   │       ├── choosers.py
    │   │   │       ├── command.py
    │   │   │       ├── core
    │   │   │       │   ├── chooser.py
    │   │   │       │   ├── __init__.py
    │   │   │       │   └── text_input.py
    │   │   │       ├── counter.py
    │   │   │       ├── dialogs
    │   │   │       │   ├── base_dialog.py
    │   │   │       │   ├── calender_dialog.py
    │   │   │       │   ├── __init__.py
    │   │   │       │   └── time_dialog.py
    │   │   │       ├── dropdown_filterable.py
    │   │   │       ├── dropdown.py
    │   │   │       ├── __init__.py
    │   │   │       ├── listbox.py
    │   │   │       ├── numeric_fields.py
    │   │   │       ├── password.py
    │   │   │       ├── radio_group.py
    │   │   │       ├── richtextconsole.py
    │   │   │       ├── slider.py
    │   │   │       ├── textarea.py
    │   │   │       └── textfield.py
    │   │   ├── constants.py
    │   │   ├── containers
    │   │   │   ├── application.py
    │   │   │   └── __init__.py
    │   │   ├── events.py
    │   │   ├── formatters.py
    │   │   ├── host.py
    │   │   ├── image_repository.py
    │   │   ├── imageutil.py
    │   │   ├── __init__.py
    │   │   ├── lang
    │   │   │   ├── i18n_config.py
    │   │   │   ├── i18n.py
    │   │   │   └── __init__.py
    │   │   ├── processor.py
    │   │   ├── pubsub.py
    │   │   ├── seeder.py
    │   │   ├── state.py
    │   │   ├── three_to_four.py
    │   │   ├── util
    │   │   │   ├── casting.py
    │   │   │   ├── filedrop.py
    │   │   │   ├── freeze.py
    │   │   │   ├── functional.py
    │   │   │   ├── __init__.py
    │   │   │   ├── quoting.py
    │   │   │   ├── time.py
    │   │   │   └── wx_util.py
    │   │   ├── validation.py
    │   │   └── validators.py
    │   ├── images
    │   │   ├── config_icon.png
    │   │   ├── error_icon.png
    │   │   ├── __init__.py
    │   │   ├── program_icon.icns
    │   │   ├── program_icon.ico
    │   │   ├── program_icon.png
    │   │   ├── running_icon.png
    │   │   └── success_icon.png
    │   ├── __init__.py
    │   ├── languages
    │   │   ├── bosnian.json
    │   │   ├── chinese.json
    │   │   ├── croatian.json
    │   │   ├── czech.json
    │   │   ├── dutch.json
    │   │   ├── english.json
    │   │   ├── french.json
    │   │   ├── german.json
    │   │   ├── greek.json
    │   │   ├── hebrew.json
    │   │   ├── Hindi.json
    │   │   ├── __init__.py
    │   │   ├── italian.json
    │   │   ├── japanese.json
    │   │   ├── korean.json
    │   │   ├── polish.json
    │   │   ├── portuguese.json
    │   │   ├── russian.json
    │   │   ├── serbian.json
    │   │   ├── spanish.json
    │   │   ├── tamil.json
    │   │   ├── traditional-chinese.json
    │   │   ├── turkish.json
    │   │   └── vietnamese.json
    │   ├── __main__.py
    │   ├── python_bindings
    │   │   ├── argparse_to_json.py
    │   │   ├── cmd_args.py
    │   │   ├── coms.py
    │   │   ├── config_generator.py
    │   │   ├── constants.py
    │   │   ├── constraints.py
    │   │   ├── control.py
    │   │   ├── dynamics.py
    │   │   ├── gooey_decorator.py
    │   │   ├── gooey_parser.py
    │   │   ├── __init__.py
    │   │   ├── parameters.py
    │   │   ├── parser
    │   │   │   └── gooey_parser.py
    │   │   ├── parser_exceptions.py
    │   │   ├── schema.py
    │   │   ├── signal_support.py
    │   │   └── types.py
    │   ├── tests
    │   │   ├── all_widgets.py
    │   │   ├── all_widgets_subparser.py
    │   │   ├── auto_start.py
    │   │   ├── dynamics
    │   │   │   ├── files
    │   │   │   │   ├── basic.py
    │   │   │   │   ├── __init__.py
    │   │   │   │   ├── lifecycles.py
    │   │   │   │   └── tmp.txt
    │   │   │   ├── __init__.py
    │   │   │   ├── test_dynamics.py
    │   │   │   ├── test_live_updates.py
    │   │   │   └── tmp.txt
    │   │   ├── gooey_config__autostart.json
    │   │   ├── gooey_config__normal.json
    │   │   ├── gooey_config__subparser.json
    │   │   ├── gooey_config__validation.json
    │   │   ├── harness.py
    │   │   ├── __init__.py
    │   │   ├── integration
    │   │   │   ├── __init__.py
    │   │   │   ├── integ_autostart.py
    │   │   │   ├── integ_subparser_demo.py
    │   │   │   ├── integ_validations.py
    │   │   │   ├── integ_widget_demo.py
    │   │   │   ├── programs
    │   │   │   │   ├── all_widgets.py
    │   │   │   │   ├── all_widgets_subparser.py
    │   │   │   │   ├── auto_start.py
    │   │   │   │   ├── gooey_config.json
    │   │   │   │   ├── __init__.py
    │   │   │   │   └── validations.py
    │   │   │   ├── README.md
    │   │   │   └── runner.py
    │   │   ├── processor
    │   │   │   ├── files
    │   │   │   │   ├── ignore_break.py
    │   │   │   │   ├── ignore_interrupt.py
    │   │   │   │   ├── infinite_loop.py
    │   │   │   │   └── __init__.py
    │   │   │   ├── __init__.py
    │   │   │   └── test_processor.py
    │   │   ├── test_application.py
    │   │   ├── test_argparse_to_json.py
    │   │   ├── test_checkbox.py
    │   │   ├── test_chooser_results.py
    │   │   ├── test_cli.py
    │   │   ├── test_cmd_args.py
    │   │   ├── test_common.py
    │   │   ├── test_config_generator.py
    │   │   ├── test_constraints.py
    │   │   ├── test_control.py
    │   │   ├── test_counter.py
    │   │   ├── test_decoration.py
    │   │   ├── test_dropdown.py
    │   │   ├── test_filterable_dropdown.py
    │   │   ├── test_filtering.py
    │   │   ├── test_formatters.py
    │   │   ├── test_header.py
    │   │   ├── test_listbox.py
    │   │   ├── test_numeric_inputs.py
    │   │   ├── test_options.py
    │   │   ├── test_parent_inheritance.py
    │   │   ├── test_password.py
    │   │   ├── test_radiogroup.py
    │   │   ├── test_slider.py
    │   │   ├── test_textarea.py
    │   │   ├── test_textfield.py
    │   │   ├── test_time_remaining.py
    │   │   ├── test_util.py
    │   │   ├── tmmmmp.py
    │   │   └── tmp.txt
    │   └── util
    │       ├── functional.py
    │       └── __init__.py
    ├── images
    ├── ISSUE_TEMPLATE.md
    ├── LICENSE.txt
    ├── MANIFEST.in
    ├── pip_deploy.py
    ├── README.md
    ├── requirements.txt
    ├── setup.py
    └── TODO.md

31 directories, 222 files

标签:

实例下载地址

Gooey: 将(几乎)任何Python命令行程序转换为完整的GUI应用程序,只需一行代码

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警