A simple Python module that automatically executes functions on load
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
automain
.gitignore
README
README.md
example-traceback.py
example.py
setup.py

README.md

automain

A neater shortcut to using the syntax:

def mymain():
    print 'this is our main function'

if __name__ == '__main__':
    mymain()

Instead, you can do:

from automain import *  # will only import the automain decorator

@automain
def mymain():
    print 'this is our main function'