automain 1.2
A more aesthetically pleasing replacement of "if __name__ == 'main':"
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'
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| automain-1.2.tar.gz (md5) | Source | 2011-01-26 | 893B | 433 | |
- Author: Gerald Kaszuba
- Home Page: http://slowchop.com/2011/01/25/automain/
- Package Index Owner: gak
- DOAP record: automain-1.2.xml
