CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 26 of file main.py.

Constructor & Destructor Documentation

def main.SkeletonOptionParser.__init__ (   self)

Definition at line 28 of file main.py.

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

Member Function Documentation

def main.SkeletonOptionParser.get_opt (   self)

Definition at line 65 of file main.py.

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

Member Data Documentation

main.SkeletonOptionParser.parser

Definition at line 31 of file main.py.