Closed tschm closed 10 months ago
The fire.Fire function always "fires off" / executes the command passed to it. If no command is passed, then sys.argv is used as the command (that's what lets it produce CLIs so easily). That's what's happening here.
If you want to get a new input from the user, you could do that before calling Fire, e.g.:
def outer(strategy, default):
"""outer cli interface"""
def inner(filename=default, output=Path.home() / "data"):
# Do something with strategy
# expose inner as cli
command = input() # Get a new input from the user
return fire.Fire(inner, command=command)
I have a function
I was hoping fire works for this situation, too. Fire seems to try to execute the inner function.