(f)
r"""
    >>> import io
    >>> read_uint2(io.BytesIO(b'\xff\x00'))
    255
    >>> read_uint2(io.BytesIO(b'\xff\xff'))
    65535
r"""
    >>> import io
    >>> read_uint2(io.BytesIO(b'\xff\x00'))
    255
    >>> read_uint2(io.BytesIO(b'\xff\xff'))
    65535
r >>> import io >>> read_uint2 ( io . BytesIO ( b \ xff \ x00 )) 255 >>> read_uint2 ( io . BytesIO ( b \ xff \ xff )) 65535
def read_uint2(f):
    r"""
    >>> import io
    >>> read_uint2(io.BytesIO(b'\xff\x00'))
    255
    >>> read_uint2(io.BytesIO(b'\xff\xff'))
    65535
    """

    data = f.read(2)
    if len(data) == 2:
        return _unpack("<H", data)[0]
    raise ValueError("not enough data in stream to read uint2")
def read_uint2 ( f ) : data = f . read ( 2 ) if len ( data ) == 2 : return _unpack ( "<H" , data ) [ 0 ] raise ValueError ( "not enough data in stream to read uint2" )