MCPcopy Index your code
hub / github.com/python/cpython / print_usage

Method print_usage

Lib/optparse.py:1568–1578  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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:

Callers 4

mainFunction · 0.95
errorMethod · 0.95
mainFunction · 0.95
__main__.pyFile · 0.45

Calls 1

get_usageMethod · 0.95

Tested by

no test coverage detected