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

Function sum

tools/python-3.11.9-amd64/Tools/scripts/md5sum.py:26–42  ·  view source on GitHub ↗
(*files)

Source from the content-addressed store, hash-verified

24from hashlib import md5
25
26def sum(*files):
27 sts = 0
28 if files and isinstance(files[-1], io.IOBase):
29 out, files = files[-1], files[:-1]
30 else:
31 out = sys.stdout
32 if len(files) == 1 and not isinstance(files[0], str):
33 files = files[0]
34 for f in files:
35 if isinstance(f, str):
36 if f == '-':
37 sts = printsumfp(sys.stdin, '<stdin>', out) or sts
38 else:
39 sts = printsum(f, out) or sts
40 else:
41 sts = sum(f, out) or sts
42 return sts
43
44def printsum(filename, out=sys.stdout):
45 try:

Callers 15

mainFunction · 0.70
_sumFunction · 0.50
_ssFunction · 0.50
_display_widthFunction · 0.50
__init__Method · 0.50
calc_chksumsFunction · 0.50
opcode.pyFile · 0.50
_guess_delimiterMethod · 0.50
ratioMethod · 0.50
get_time_timerMethod · 0.50
countMethod · 0.50

Calls 2

printsumfpFunction · 0.85
printsumFunction · 0.85

Tested by 2

testGenexpsMethod · 0.40
testGenexpsMethod · 0.40