On Jul 29, 2021, at 12:46 PM, Eric Lease Morgan <[log in to unmask]> wrote:
> So far, Click has been working for me: https://click.palletsprojects.com/en/8.0.x/
My Click script is coming along quite nicely, but now I have a Python noobie question. My script is getting longer and longer with various definitions looking something like this:
@click.command()
def config() :
# do cool stuff here
@click.command()
@click.argument( 'location' )
def list( location ) :
# do more cool stuff
@click.command()
@click.argument( 'carrel' )
def harvest( carrel ) :
# do even more cool stuff
What is the technique I should use if I want to put each of these little functions into individual files? In the end, I'd like to have a whole set of little files where each one does a specific operation. I suppose I could create file full of functions, but then that file would be very long.
--
Eric "Sort Of Embarrassed" Morgan
|