docs: def viewlog(calc_id, host='localhost', port=8000):
      """
      Extract the log of the given calculation ID from the WebUI
      """
      base_url = 'http://%s:%s/v1/calc/' % (host, port)
      start = 0
      psize = 10  # page size
      try:
          while True:
              url = base_url + '%d/log/%d:%d' % (calc_id, start, start + psize)
              rows = json.load(urlopen(url))
              for row in rows:
                  print(' '.join(row))
              start += len(rows)
              time.sleep(1)
      except:
          pass