#NEWLINE# def _prompt( self ) : #NEWLINE# #INDENT# if self . _meta . clear : #NEWLINE# #INDENT# os . system ( self . _meta . clear_command ) #NEWLINE# #UNINDENT# text = '' #NEWLINE# if ( self . _meta . options is not None ) : #NEWLINE# #INDENT# if ( self . _meta . numbered is True ) : #NEWLINE# #INDENT# text = ( ( text + self . _meta . text ) + '\n\n' ) #NEWLINE# count = 1 #NEWLINE# for option in self . _meta . options : #NEWLINE# #INDENT# text = ( text + ( '%s: %s\n' % ( count , option ) ) ) #NEWLINE# count += 1 #NEWLINE# #UNINDENT# text = ( text + '\n' ) #NEWLINE# text = ( text + self . _meta . selection_text ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sep = self . _meta . options_separator #NEWLINE# text = ( '%s [%s]' % ( self . _meta . text , sep . join ( self . _meta . options ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# text = self . _meta . text #NEWLINE# #UNINDENT# if ( sys . version_info [ 0 ] < 3 ) : #NEWLINE# #INDENT# self . input = raw_input ( ( '%s ' % text ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . input = input ( ( '%s ' % text ) ) #NEWLINE# #UNINDENT# if ( ( self . input == '' ) and ( self . _meta . default is not None ) ) : #NEWLINE# #INDENT# self . input = self . _meta . default #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . input == '' ) : #NEWLINE# #INDENT# self . input = None