print_usage(file : file = stdout) Print the usage message for the current program (self.usage) to 'file' (default stdout). Any occurrence of the string "%prog" in self.usage is replaced with the name of the current program (basename of sys.argv[0]). Does nothi
(self, file=None)
| 1576 | return "" |
| 1577 | |
| 1578 | def print_usage(self, file=None): |
| 1579 | """print_usage(file : file = stdout) |
| 1580 | |
| 1581 | Print the usage message for the current program (self.usage) to |
| 1582 | 'file' (default stdout). Any occurrence of the string "%prog" in |
| 1583 | self.usage is replaced with the name of the current program |
| 1584 | (basename of sys.argv[0]). Does nothing if self.usage is empty |
| 1585 | or not defined. |
| 1586 | """ |
| 1587 | if self.usage: |
| 1588 | print(self.get_usage(), file=file) |
| 1589 | |
| 1590 | def get_version(self): |
| 1591 | if self.version: |