#NEWLINE# def read_memory( self , session , space , offset , width , extended = False ) : #NEWLINE# #INDENT# 'Reads in an 8-bit, 16-bit, 32-bit, or 64-bit value from the specified memory space and offset.\n\n        Corresponds to viIn* functions of the VISA library.\n\n        :param session: Unique logical identifier to a session.\n        :param space: Specifies the address space. (Constants.*SPACE*)\n        :param offset: Offset (in bytes) of the address or register from which to read.\n        :param width: Number of bits to read.\n        :param extended: Use 64 bits offset independent of the platform.\n        :return: Data read from memory, return value of the library call.\n        :rtype: int, :class:`pyvisa.constants.StatusCode`\n        ' #NEWLINE# if ( width == 8 ) : #NEWLINE# #INDENT# return self . in_8 ( session , session , offset , extended ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( width == 16 ) : #NEWLINE# #INDENT# return self . in_16 ( session , space , offset , extended ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( width == 32 ) : #NEWLINE# #INDENT# return self . in_32 ( session , space , offset , extended ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( width == 64 ) : #NEWLINE# #INDENT# return self . in_64 ( session , space , offset , extended ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# raise ValueError ( ( '%s is not a valid size. Valid values are 8, 16, 32 or 64' % width ) )