There are many ways to invoke a function from the commandline. You can use setuptools' console_scripts entrypoint. You can use a decorator from click. And of course you can always do the classic if __name__ == "__main__": main() to call whatever main() is. But there are inconveniences with these approaches. For setuptools, you have to actually run setup, somehow. For click, you have to install click. And for __name__, you are either locked into a single function name, or you have to write some arg parsing to determine what name to use. I propose it would be nice to be able to call a function from python, using syntax like python -m module:thunk The simplest proposal, I think, is if the function must accept no arguments -- or at least no required ones. This could be as straightforward as just being shorthand for python -c 'import module; module.thunk()' and remove a small amount of code that is repeated very frequently. I picked the colon syntax because that is what several other tools that enable calling functions from the commandline seem to do, but if your only objection is the specific syntax I picked, please propose a different one. What do you think?