Skip to content
/ automain Public

A simple Python module that automatically executes functions on load

Notifications You must be signed in to change notification settings

gak/automain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'

About

A simple Python module that automatically executes functions on load

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages