Annotation of templates/template.py, revision 1.3

1.1       nick        1: #!/usr/bin/python
                      2: 
1.2       nick        3: """
                      4: +------------------------------------------------------------------------------
                      5: |
                      6: |   Copyright Nicholas DeClario 2013
                      7: |   Nicholas DeClario <nick@demandred.dyndns.org>
                      8: |   March 2013
1.3     ! nick        9: |       $Id: template.py,v 1.2 2013-08-26 20:51:24 nick Exp $
1.2       nick       10: |
                     11: +------------------------------------------------------------------------------
1.1       nick       12: 
1.2       nick       13: """
                     14: import os
                     15: import sys
                     16: import argparse
1.1       nick       17: 
1.2       nick       18: """
                     19:  fetchOptions()
1.1       nick       20: 
1.2       nick       21:     Grab our command line arguments and toss them in to a hash
                     22: """
1.1       nick       23: 
                     24: 
1.2       nick       25: def fetchOptions():
1.3     ! nick       26:     parse = argparse.ArgumentParser()
1.2       nick       27:     parse.add_argument('-m', '--man', help='Display the man page', \
                     28:                        dest='man', default=False, action='store_true')
                     29:     parse.add_argument('-t', '--test', help='Test Argument', dest='test')
1.1       nick       30: 
1.2       nick       31:     return parse.parse_args()
                     32: 
                     33: """
                     34:  The magic starts here
                     35: """
                     36: 
                     37: 
                     38: def main():
                     39: 
                     40:     if opts.man:
                     41:         displayMan()
                     42: 
                     43: 
                     44: if __name__ == '__main__':
                     45:     opts = fetchOptions()
                     46:     main()

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>