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

Function main

Tools/i18n/msgfmt.py:233–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231
232
233def main():
234 try:
235 opts, args = getopt.getopt(sys.argv[1:], 'hVo:',
236 ['help', 'version', 'output-file='])
237 except getopt.error as msg:
238 usage(1, msg)
239
240 outfile = None
241 # parse options
242 for opt, arg in opts:
243 if opt in ('-h', '--help'):
244 usage(0)
245 elif opt in ('-V', '--version'):
246 print("msgfmt.py", __version__)
247 sys.exit(0)
248 elif opt in ('-o', '--output-file'):
249 outfile = arg
250 # do it
251 if not args:
252 print('No input file given', file=sys.stderr)
253 print("Try `msgfmt --help' for more information.", file=sys.stderr)
254 return
255
256 for filename in args:
257 make(filename, outfile)
258
259
260if __name__ == '__main__':

Callers 1

msgfmt.pyFile · 0.70

Calls 3

makeFunction · 0.85
usageFunction · 0.70
exitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…