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

Method get_prog_name

Lib/optparse.py:1534–1538  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1532 # -- Feedback methods ----------------------------------------------
1533
1534 def get_prog_name(self):
1535 if self.prog is None:
1536 return os.path.basename(sys.argv[0])
1537 else:
1538 return self.prog
1539
1540 def expand_prog_name(self, s):
1541 return s.replace("%prog", self.get_prog_name())

Callers 2

expand_prog_nameMethod · 0.95
errorMethod · 0.95

Calls 1

basenameMethod · 0.45

Tested by

no test coverage detected