First of all - a well written and complete book for intermediate to advanced Python users. It covers a lot of territory and for the most part will work as is on a variety of systems. I did find one bug in chapter 17 that prevents you from moving through the last part of the chapter. The error is in flags2_common.py on Windows 8-10: Not sure if this effects other systems too. The code provided is this...
def main(download_many, default_concur_req, max_concur_req):
args, cc_list = process_args(default_concur_req)
actual_req = min(args.max_req, max_concur_req, len(cc_list))
initial_report(cc_list, actual_req, args.server)
base_url = SERVERS[args.server]
t0 = time.time()
counter = download_many(cc_list, base_url, args.verbose, actual_req)
assert sum(counter.values()) == len(cc_list), \
'some downloads are unaccounted for'
final_report(cc_list, counter, t0)
For windows, this will throw an error: This code works better...
def main(download_many, default_concur_req, max_concur_req):
args, cc_list = process_args(default_concur_req)
actual_req = min(args.max_req, max_concur_req, len(cc_list))
initial_report(cc_list, actual_req, args.server)
base_url = SERVERS[args.server]
t0 = time.time()
counter = download_many(cc_list, base_url, args.verbose, actual_req)
assert sum(counter.values()) == len(cc_list), 'some downloads are unaccounted for'
final_report(cc_list, counter, t0)
Let me know if you need clarification.