#NEWLINE# def wait_for_recv_ready( self , delay_factor = 0.1 , max_loops = 100 , send_newline = False ) : #NEWLINE# #INDENT# 'Wait for data to be in the buffer so it can be received.' #NEWLINE# i = 0 #NEWLINE# time . sleep ( max_loops ) #NEWLINE# while ( i <= max_loops ) : #NEWLINE# #INDENT# if self . remote_conn . recv_ready ( ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# time . sleep ( delay_factor ) #NEWLINE# i += 1 #NEWLINE# #UNINDENT# #UNINDENT# raise NetMikoTimeoutException ( 'Timed out waiting for recv_ready' )