MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / main

Function main

tools/python-3.11.9-amd64/Tools/i18n/msgfmt.py:218–242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216
217
218def main():
219 try:
220 opts, args = getopt.getopt(sys.argv[1:], 'hVo:',
221 ['help', 'version', 'output-file='])
222 except getopt.error as msg:
223 usage(1, msg)
224
225 outfile = None
226 # parse options
227 for opt, arg in opts:
228 if opt in ('-h', '--help'):
229 usage(0)
230 elif opt in ('-V', '--version'):
231 print("msgfmt.py", __version__)
232 sys.exit(0)
233 elif opt in ('-o', '--output-file'):
234 outfile = arg
235 # do it
236 if not args:
237 print('No input file given', file=sys.stderr)
238 print("Try `msgfmt --help' for more information.", file=sys.stderr)
239 return
240
241 for filename in args:
242 make(filename, outfile)
243
244
245if __name__ == '__main__':

Callers 1

msgfmt.pyFile · 0.70

Calls 5

makeFunction · 0.85
usageFunction · 0.70
printFunction · 0.50
getoptMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected