'shows the public key hash encoded in an address.'

def q_addresstohash(abe, page, chain):

    addr = wsgiref.util.shift_path_info(page['env'])
    if (addr is None):
        return 'Shows    the    160-bit    hash    encoded    in    ADDRESS.\nFor    BBE    compatibility,    the    address    is    not    checked    for    validity.        See    also    /q/decode_address.\n/q/addresstohash/ADDRESS\n'
    (version, hash) = util.decode_address(addr)
    return hash.encode('hex').upper()
