Commit 786b0778 authored by Louis's avatar Louis
Browse files

Add a ``pyromaths-cli gui`` command, to launch the GUI from the CLI.

parent 87a9f083
......@@ -103,6 +103,13 @@ def argument_parser():
)
test.add_argument('args', nargs=argparse.REMAINDER)
# GUI
gui = subparsers.add_parser(
'gui',
help='Launch the pyromaths graphical user interface.',
)
gui.add_argument('args', nargs=argparse.REMAINDER)
return parser
def do_test(options):
......@@ -110,6 +117,12 @@ def do_test(options):
from pyromaths.cli.test import __main__
sys.exit(__main__.main(options.args))
def do_gui(options):
"""Action for command line 'gui'."""
from pyromaths import pyromaths
sys.argv = ["pyromaths"] + sys.argv[2:]
pyromaths.main()
def do_generate(options):
"""Action for command line 'generate'."""
tests = TestPerformer()
......@@ -142,6 +155,7 @@ COMMANDS = {
"generate": do_generate,
"lsexos": do_lsexos,
"test": do_test,
"gui": do_gui,
}
def main():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment