Skip to content

Instantly share code, notes, and snippets.

Last active December 8, 2022 08:07
What would you like to do?
def __main__():
print("hello world")
# put this file at ~/.local/lib/python3.10/site-packages/
def launch(f):
import inspect
module = inspect.getmodule(f)
if module is not None and module.__name__ == '__main__':
import atexit
__builtins__['main'] = launch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment