def getIPaddr(prefix):
    """
    Get the IP address of the client, by grocking the .html report.
    """
    addr="Unknown"
    f=open(prefix+".html", "r")
    for l in f:
        w=l.split(" ")
        if w[0] == "Target:":
            addr=w[2].lstrip("(").rstrip(")")
            break
    f.close()
    return(addr)


    """
    Busted (but otherwise more correct) web100 method
    Open a web100 logfile to extract the "RemoteAddr"

    print "Opening", log

    vlog = libweb100.web100_log_open_read(log)
    agent = libweb100.web100_get_log_agent(vlog)
    group = libweb100.web100_get_log_group(vlog)
    conn  = libweb100.web100_get_log_connection(vlog)
    var = libweb100.web100_var_find(group, "RemoteAddr")

    snap  = libweb100.web100_snapshot_alloc(group, conn)
    libweb100.web100_snap_from_log(snap, vlog)
    buf=cast(create_string_buffer(20), cvar.anything) # XXX
    libweb100.web100_snap_read(var, snap, buf)
    val=libweb100.web100_value_to_text(WEB100_TYPE_IP_ADDRESS, buf)
    libweb100.web100_log_close_read(vlog)
    print val
    """