Mercurial > hg > configuration
changeset 18:d8871956536e
remove cruft and start to organize
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 26 Mar 2012 13:19:55 -0700 |
parents | a78ab14ae376 |
children | cadc9514f60a |
files | configuration/config.py |
diffstat | 1 files changed, 3 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/configuration/config.py Mon Mar 26 12:04:49 2012 -0700 +++ b/configuration/config.py Mon Mar 26 13:19:55 2012 -0700 @@ -72,6 +72,9 @@ self.config.update(config) # TODO: option to extend; augment lists/dicts + ### methods for optparse + ### XXX could go in a subclass + def optparse_options(self, parser): """add optparse options to a OptionParser instance""" for key, value in self.items(): @@ -118,14 +121,3 @@ parser = optparse.OptionParser(**parser_args) self.optparse_options(parser) return parser - -def main(args=sys.argv[:]): - - # parse command line options - usage = '%prog [options]' - parser = optparse.OptionParser(usage=usage, description=__doc__, formatter=PlainDescriptionFormatter()) - options, args = parser.parse_args(args) - -if __name__ == '__main__': - main() -