CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
main.SkeletonOptionParser Class Reference

Public Member Functions

def __init__ (self)
 
def get_opt (self)
 

Public Attributes

 parser
 

Detailed Description

Definition at line 26 of file main.py.

Constructor & Destructor Documentation

def main.SkeletonOptionParser.__init__ (   self)

Definition at line 28 of file main.py.

28  def __init__(self):
29  cname = os.environ.get('MKTMPL_CMD', 'main.py')
30  usage = "Usage: %s [options]\n" % cname
31  self.parser = OptionParser(usage=usage)
32  msg = "debug output"
33  self.parser.add_option("--debug", action="store_true",
34  default=False, dest="debug", help=msg)
35  msg = "specify template, e.g. EDProducer"
36  self.parser.add_option("--tmpl", action="store", type="string",
37  default='', dest="tmpl", help=msg)
38  msg = "specify package name, e.g. MyProducer"
39  self.parser.add_option("--name", action="store", type="string",
40  default="TestPkg", dest="pname", help=msg)
41  msg = "specify author name"
42  self.parser.add_option("--author", action="store", type="string",
43  default="", dest="author", help=msg)
44  msg = "specify file type to generate, "
45  msg += "e.g. --ftype=header, default is all files"
46  self.parser.add_option("--ftype", action="store", type="string",
47  default="all", dest="ftype", help=msg)
48  msg = "list examples tags which should be kept in "
49  msg += "generate code, e.g. "
50  msg += "--keep-etags='@example_trac,@example_hist'"
51  self.parser.add_option("--keep-etags", action="store", type="string",
52  default=None, dest="ketags", help=msg)
53  msg = "specify template directory, "
54  self.parser.add_option("--tdir", action="store", type="string",
55  default=tmpl_dir(), dest="tdir", help=msg)
56  msg = "list template tags"
57  self.parser.add_option("--tags", action="store_true",
58  default=False, dest="tags", help=msg)
59  msg = "list template example tags"
60  self.parser.add_option("--etags", action="store_true",
61  default=False, dest="etags", help=msg)
62  msg = "list supported templates"
63  self.parser.add_option("--templates", action="store_true",
64  default=False, dest="templates", help=msg)
def tmpl_dir()
Definition: main.py:22
def __init__(self)
Definition: main.py:28

Member Function Documentation

def main.SkeletonOptionParser.get_opt (   self)

Definition at line 65 of file main.py.

65  def get_opt(self):
66  "Returns parse list of options"
67  return self.parser.parse_args()
68 
def get_opt(self)
Definition: main.py:65

Member Data Documentation

main.SkeletonOptionParser.parser

Definition at line 31 of file main.py.