Changeset 3315
- Timestamp:
- 02/02/08 13:38:02 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/commandline.py
r3314 r3315 41 41 optparse.OptionParser.__init__(self, *args, **kwargs) 42 42 self.disable_interspersed_args() 43 self.add_option("-v", "--version", 44 action="store_true", 45 dest="version", 46 help=_("show %prog's version number and exit.")) 43 self.add_generic_options() 47 44 48 45 def format_help(self, formatter=None) : … … 101 98 self.examples.append(("%prog " + command, doc)) 102 99 100 def add_generic_options(self) : 101 """Adds options which are common to all PyKota command line tools.""" 102 self.add_option("-v", "--version", 103 action="store_true", 104 dest="version", 105 help=_("show the version number and exit")) 106 103 107 def handle_generic_options(self, options) : 104 108 """Handles options which are common to all PyKota command line tools."""