#NEWLINE# def send_command_w_enter( self , * args , **kwargs ) : #NEWLINE# #INDENT# "\n        For 'show run-config' Cisco WLC adds a 'Press Enter to continue...' message\n        Even though pagination is disabled\n        show run-config also has excessive delays in the output which requires special\n        handling.\n        Arguments are the same as send_command() method\n        " #NEWLINE# if ( len ( args ) > 1 ) : #NEWLINE# #INDENT# raise ValueError ( 'Must pass in delay_factor as keyword argument' ) #NEWLINE# #UNINDENT# if kwargs . get ( 'delay_factor' ) : #NEWLINE# #INDENT# kwargs [ 'delay_factor' ] = self . select_delay_factor ( kwargs [ 'delay_factor' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# kwargs [ 'delay_factor' ] = self . select_delay_factor ( 3 ) #NEWLINE# #UNINDENT# output = self . send_command ( * args , ** kwargs ) #NEWLINE# if ( 'Press Enter to' in output ) : #NEWLINE# #INDENT# new_args = list ( args ) #NEWLINE# if ( len ( args ) == 1 ) : #NEWLINE# #INDENT# new_args [ 0 ] = '\n' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# kwargs [ 'command_string' ] = '\n' #NEWLINE# #UNINDENT# if ( not kwargs . get ( 'max_loops' ) ) : #NEWLINE# #INDENT# kwargs [ 'max_loops' ] = 150 #NEWLINE# #UNINDENT# output = self . send_command ( * new_args , ** kwargs ) #NEWLINE# if ( '802.11b Advanced Configuration' in output ) : #NEWLINE# #INDENT# time . sleep ( ( kwargs [ 'delay_factor' ] * 10 ) ) #NEWLINE# not_done = True #NEWLINE# i = 1 #NEWLINE# while ( not_done and ( i <= 150 ) ) : #NEWLINE# #INDENT# time . sleep ( kwargs [ 'delay_factor' ] ) #NEWLINE# i += 1 #NEWLINE# if self . remote_conn . recv_ready ( ) : #NEWLINE# #INDENT# output += self . remote_conn . recv ( MAX_BUFFER ) . decode ( 'utf-8' , 'ignore' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# not_done = False #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# strip_prompt = kwargs . get ( 'strip_prompt' , True ) #NEWLINE# if strip_prompt : #NEWLINE# #INDENT# output = self . strip_prompt ( output ) #NEWLINE# output = self . strip_prompt ( output ) #NEWLINE# #UNINDENT# return output