6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-09-21 17:09:03 +00:00
tutor/tutor/commands/ui.py

22 lines
597 B
Python
Raw Normal View History

import click
import click_repl
2019-04-23 07:57:55 +00:00
@click.command(
short_help="Interactive shell",
help="Launch an interactive shell for launching Tutor commands",
)
def ui():
click.echo(
"""Welcome to the Tutor interactive shell UI!
Type "help" to view all available commands.
Type "local quickstart" to configure and launch a new platform from scratch.
Type <ctrl-d> to exit."""
)
while True:
try:
click_repl.repl(click.get_current_context())
return # this happens on a ctrl+d
2019-04-23 07:57:55 +00:00
except Exception: # pylint: disable=broad-except
pass