#NEWLINE# def check_keyboard( self ) : #NEWLINE# #INDENT# s = self . getch ( ) . lower ( ) #NEWLINE# if ( s == 'x' ) : #NEWLINE# #INDENT# self . controller . close ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( s in ( 'f' , 'r' , 'e' ) ) : #NEWLINE# #INDENT# print ( '\n\n' ) #NEWLINE# for fname in self . controller . save_current_buffers ( log_type = ( FILTERED if ( s == 'f' ) else RAW ) , log_format = ( 'both_extended' if ( s == 'e' ) else 'both' ) ) : #NEWLINE# #INDENT# print ( fname , 'saved' ) #NEWLINE# #UNINDENT# self . print_menu ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( s == '?' ) : #NEWLINE# #INDENT# self . print_menu ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( s == 'c' ) : #NEWLINE# #INDENT# print ( '\nConfig file(s):' , self . controller . config . filenames ) #NEWLINE# for key in sorted ( self . controller . config . keys ( ) ) : #NEWLINE# #INDENT# print ( ( '\t%s = %s' % ( key , str ( self . controller . config [ key ] ) ) ) ) #NEWLINE# #UNINDENT# print ( 'Stations:' , self . controller . config . stations ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( s == 'v' ) : #NEWLINE# #INDENT# print ( '\n' ) #NEWLINE# try : #NEWLINE# #INDENT# print ( self . controller . about_app ( ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# print ( "Warning: cannot get all modules' versions" ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# sys . stdout . write ( '\x07' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( s != 'x' ) : #NEWLINE# #INDENT# self . timer = Timer ( 0.5 , self . check_keyboard ) #NEWLINE# self . timer . start ( )