Skip to content

Commit

Permalink
Rename shell to repl
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyGuthridge committed Jan 10, 2024
1 parent 642f305 commit 305942d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions flapi/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions flapi/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
7 changes: 4 additions & 3 deletions flapi/cli/shell.py → flapi/cli/repl.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)}")
Expand Down

0 comments on commit 305942d

Please sign in to comment.