CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
main.SkeletonOptionParser Class Reference

Public Member Functions

def __init__
 
def get_opt
 

Public Attributes

 parser
 

Detailed Description

Definition at line 23 of file main.py.

Constructor & Destructor Documentation

def main.SkeletonOptionParser.__init__ (   self)

Definition at line 25 of file main.py.

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

Member Function Documentation

def main.SkeletonOptionParser.get_opt (   self)

Definition at line 59 of file main.py.

59 
60  def get_opt(self):
61  "Returns parse list of options"
62  return self.parser.parse_args()

Member Data Documentation

main.SkeletonOptionParser.parser

Definition at line 28 of file main.py.