一个基于 Qt5 的真正快速的 ClicK GUI 生成器
A real quick GUI generator for click. Inspired by Gooey, the GUI generator for classical Python argparse-based command line programs.
python setup.py installOpen your terminal, go into the downloaded source folder and input
python test.pyThen click "Run" button. You will see something like this.
Open test.py to see what the original click-based program looks like.
This package could draw the gui for a click-based CLI program with a very
simple function gui_it. The usage is wrapping the command function
example_cmd() like gui_it(example_cmd). The full example is like
this.
…--gui option to your commandA common case is not changing all your command into a gui version, but just
add a --gui option to it. Then you can do this.
from quick import gui_option
import click
@gui_option()
@click.group()
@click.option('--debug/--no-debug', default=False)
def cli(debug):
print(debug)
@cli.command()
@click.argument("arg", nargs=-1)
@click.option("--hello", default="world", help="say hello")
@click.option('-v', '--verbose', count=True)
def example_cmd(**argvs):
for k, v in argvs.items():
print(k, v, type(v))
@cli.command()
@click.option("--hello")
def sync(hello):
print('Synching', hello)
@cli.command()
def func(**argvs):
pass
if __name__ == "__main__":
cli()Travis CI is used for continuous integration.
see LICENCE
暂无开放 Issues,或尚未同步最近议题。