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 nothing if
(self, file=None)
| 1566 | return "" |
| 1567 | |
| 1568 | def print_usage(self, file=None): |
| 1569 | """print_usage(file : file = stdout) |
| 1570 | |
| 1571 | Print the usage message for the current program (self.usage) to |
| 1572 | 'file' (default stdout). Any occurrence of the string "%prog" in |
| 1573 | self.usage is replaced with the name of the current program |
| 1574 | (basename of sys.argv[0]). Does nothing if self.usage is empty |
| 1575 | or not defined. |
| 1576 | """ |
| 1577 | if self.usage: |
| 1578 | print(self.get_usage(), file=file) |
| 1579 | |
| 1580 | def get_version(self): |
| 1581 | if self.version: |
no test coverage detected