MCPcopy Create free account
hub / github.com/ActiveState/code / log

Function log

recipes/Python/576777_Simple_FTP_Mirror/recipe-576777.py:71–78  ·  view source on GitHub ↗
(msg, level=1, abort=False)

Source from the content-addressed store, hash-verified

69 }
70
71def log(msg, level=1, abort=False):
72 if level <= globals['verbose'] or abort:
73 if abort:
74 sys.stdout = sys.stderr
75 print
76 print msg
77 if abort:
78 sys.exit(1)
79
80def strfbytes(value):
81 units = ['Bytes', 'KB', 'MB', 'GB', 'TB']

Callers 15

makedirMethod · 0.70
removefileMethod · 0.70
removedirMethod · 0.70
makedirMethod · 0.70
removefileMethod · 0.70
removedirMethod · 0.70
mirrorFunction · 0.70
infoFunction · 0.70
removeFunction · 0.70
mainFunction · 0.70
recipe-576777.pyFile · 0.70
recipe-544288.pyFile · 0.50

Calls 1

exitMethod · 0.45

Tested by 2

test_roundersFunction · 0.40
test_combinedFunction · 0.40