In python, I can have the
if __name__=='__main__': main()
at the end if a script, and easily import the script's functions into
- pytest for testing
- some other module for larger modules
- into a cli.py file to slap a Click interface on it.
What a great blend of flexibility while retaining coherence.