File:  [Local Repository] / templates / template.py
Revision 1.2: download - view: text, annotated - select for diffs
Mon Aug 26 20:51:24 2013 UTC (11 years, 2 months ago) by nick
Branches: MAIN
CVS tags: HEAD
Converted optparse to argparse and we now meet pep8 standards.

#!/usr/bin/python

"""
+------------------------------------------------------------------------------
|
|   Copyright Nicholas DeClario 2013
|   Nicholas DeClario <nick@demandred.dyndns.org>
|   March 2013
|       $Id: template.py,v 1.2 2013/08/26 20:51:24 nick Exp $
|
+------------------------------------------------------------------------------

"""
import os
import sys
import argparse

"""
 fetchOptions()

    Grab our command line arguments and toss them in to a hash
"""


def fetchOptions():
    parse = argparse.OptionParser()
    parse.add_argument('-m', '--man', help='Display the man page', \
                       dest='man', default=False, action='store_true')
    parse.add_argument('-t', '--test', help='Test Argument', dest='test')

    return parse.parse_args()

"""
 The magic starts here
"""


def main():

    if opts.man:
        displayMan()


if __name__ == '__main__':
    opts = fetchOptions()
    main()

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