Created
December 17, 2012 15:46
-
-
Save ArupSen/4319301 to your computer and use it in GitHub Desktop.
Basic boilerplate for a python script file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# -*- coding: utf-8 -*- | |
"""[application description here]""" | |
def main(): | |
pass | |
if __name__ == '__main__': main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The first boilerplate line should specify which version of Python, and is missing the environment path. It should read:
#!/usr/bin/env python2
or
#!/usr/bin/env python3
Also, the
if
statement on line 8 goes against PEP 8 - multiple statements on one line. It should read:if __name__ == '__main__':
main()