- action = "store"
- if type(default) == types.BooleanType:
- action = "store_true"
- parser.add_option("--" + opt, default=default, action=action, dest=opt, help=option_dict[opt][1])
-
-options, arguments = parser.parse_args()
+ parser = optparse.OptionParser(usage="usage: %prog <doxyml files to parse>\n" , version="%prog 1.0")
+
+ for opt in option_dict:
+ default = option_dict[opt][0]
+
+ action = "store"
+ if type(default) == types.BooleanType:
+ action = "store_true"
+ parser.add_option("--" + opt, default=default, action=action, dest=opt, help=option_dict[opt][1])
+
+ options, arguments = parser.parse_args()