def map(l, *args, **kwds):
"""Execute provided callback on all functions in database. Synonymous to map(l,db.functions()).
``l`` is defined as a function(address, *args, **kwds).
Any other arguments are passed to ``l`` unmodified.
"""
i,x = 0,here()
current = x
all = functions()
result = []
try:
for i,x in enumerate(all):
go(x)
print("{:x}: processing # {:d} of {:d} : {:s}".format(x, i+1, len(all), name(x)))
result.append( l(x, *args, **kwds) )
except KeyboardInterrupt:
print("{:x}: terminated at # {:d} of {:d} : {:s}".format(x, i+1, len(all), name(x)))
go(current)
return result
评论列表
文章目录