(self, file=None)
| 2824 | # ===================== |
| 2825 | |
| 2826 | def print_usage(self, file=None): |
| 2827 | if file is None: |
| 2828 | file = _sys.stdout |
| 2829 | formatter = self._get_formatter(file=file) |
| 2830 | try: |
| 2831 | usage_text = self.format_usage(formatter=formatter) |
| 2832 | except TypeError: |
| 2833 | # Backward compatibility for formatter classes that |
| 2834 | # do not accept the 'formatter' keyword argument. |
| 2835 | usage_text = self.format_usage() |
| 2836 | self._print_message(usage_text, file) |
| 2837 | |
| 2838 | def print_help(self, file=None): |
| 2839 | if file is None: |