dsturnbull / automain

A simple Python module that automatically executes functions on load

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

automain

A neater shortcut to using the syntax:

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'

About

A simple Python module that automatically executes functions on load


Languages

Language:Python 100.0%