diff --git a/flapi/__main__.py b/flapi/__main__.py index b7d9721..3a88b3b 100644 --- a/flapi/__main__.py +++ b/flapi/__main__.py @@ -4,7 +4,7 @@ A simple program to run Flapi commands """ from argparse import ArgumentParser -from .cli import install_main, shell_main, uninstall_main +from .cli import install_main, repl_main, uninstall_main from pathlib import Path from typing import Optional, Any @@ -87,15 +87,15 @@ def uninstall(args): default=None, ) ]) -def shell(args): - """Launch a shell connected to FL Studio""" - shell_main(args.shell) +def repl(args): + """Launch a Python REPL connected to FL Studio""" + repl_main(args.shell) def main(): args = cli.parse_args() if args.subcommand is None: - shell_main() + repl_main() else: args.func(args) diff --git a/flapi/cli/__init__.py b/flapi/cli/__init__.py index 1b97222..f034af7 100644 --- a/flapi/cli/__init__.py +++ b/flapi/cli/__init__.py @@ -5,11 +5,11 @@ """ from .install import install_main from .uninstall import uninstall_main -from .shell import shell_main +from .repl import repl_main __all__ = [ 'install_main', 'uninstall_main', - 'shell_main', + 'repl_main', ] diff --git a/flapi/cli/shell.py b/flapi/cli/repl.py similarity index 92% rename from flapi/cli/shell.py rename to flapi/cli/repl.py index 027d104..7a79cd8 100644 --- a/flapi/cli/shell.py +++ b/flapi/cli/repl.py @@ -1,7 +1,8 @@ """ -# Flapi > Shell +# Flapi > REPL -A simple shell to interact with FL Studio +Starts a simple REPL to interact with FL Studio, using IPython (if available) +or Python's integrated shell. """ import sys import code @@ -51,7 +52,7 @@ def start_ipython_shell(): start_ipython(argv=[], user_ns=SHELL_SCOPE, config=config) -def shell_main(shell_to_use: Optional[str] = None): +def repl_main(shell_to_use: Optional[str] = None): """Main function to set up the Python shell""" print("Flapi interactive shell") print(f"Client version: {'.'.join(str(n) for n in consts.VERSION)}")