def peek(library, session, address, width):
    """Read an 8, 16 or 32-bit value from the specified address.

    Corresponds to viPeek* functions of the VISA library.

    :param library: the visa library wrapped by ctypes.
    :param session: Unique logical identifier to a session.
    :param address: Source address to read the value.
    :param width: Number of bits to read.
    :return: Data read from bus, return value of the library call.
    :rtype: bytes, :class:`pyvisa.constants.StatusCode`
    """

    if width == 8:
        return peek_8(library, session, address)
    elif width == 16:
        return peek_16(library, session, address)
    elif width == 32:
        return peek_32(library, session, address)
    elif width == 64:
        return peek_64(library, session, address)

    raise ValueError('%s is not a valid size. Valid values are 8, 16, 32 or 64' % width)
def peek ( library , session , address , width ) : if width == 8 : return peek_8 ( library , session , address ) elif width == 16 : return peek_16 ( library , session , address ) elif width == 32 : return peek_32 ( library , session , address ) elif width == 64 : return peek_64 ( library , session , address ) raise ValueError ( '%s is not a valid size. Valid values are 8, 16, 32 or 64' % width )
Read an 8, 16 or 32-bit value from the specified address.

    Corresponds to viPeek* functions of the VISA library.

    :param library: the visa library wrapped by ctypes.
    :param session: Unique logical identifier to a session.
    :param address: Source address to read the value.
    :param width: Number of bits to read.
    :return: Data read from bus, return value of the library call.
    :rtype: bytes, :class:`pyvisa.constants.StatusCode`