<s> """<STR_LIT>""" <EOL> try : <EOL> from org . gnu . readline import Readline , ReadlineCompleter <EOL> except ImportError , msg : <EOL> raise ImportError , '<STR_LIT>' % msg <EOL> __all__ = [ "<STR_LIT>" ] <EOL> def parse_and_bind ( bindings ) : <EOL> """<STR_LIT>""" <EOL> Readline . parseAndBind ( bindings ) <EOL> def get_line_buffer ( ) : <EOL> """<STR_LIT>""" <EOL> return Readline . getLineBuffer ( ) <EOL> def read_init_file ( filename ) : <EOL> """<STR_LIT>""" <EOL> Readline . readInitFile ( filename ) <EOL> def read_history_file ( filename ) : <EOL> """<STR_LIT>""" <EOL> Readline . readHistoryFile ( filename ) <EOL> def write_history_file ( filename ) : <EOL> """<STR_LIT>""" <EOL> Readline . writeHistoryFile ( filename ) <EOL> def set_completer ( completionfunction = None ) : <EOL> """<STR_LIT>""" <EOL> class DerivedCompleter ( ReadlineCompleter ) : <EOL> def __init__ ( self , method ) : <EOL> self . method = method <EOL> def completer ( self , text , state ) : <EOL> return self . method ( text , state ) <EOL> Readline . setCompleter ( DerivedCompleter ( completionfunction ) ) <EOL> def get_completer ( ) : <EOL> """<STR_LIT>""" <EOL> return Readline . getCompleter ( ) <EOL> def set_completer_delims ( delimiters ) : <EOL> """<STR_LIT>""" <EOL> Readline . setWordBreakCharacters ( delimiters ) <EOL> def get_completer_delims ( ) : <EOL> """<STR_LIT>""" <EOL> return Readline . getWordBreakCharacters ( ) <EOL> def add_history ( line ) : <EOL> """<STR_LIT>""" <EOL> Readline . addToHistory ( line ) <EOL> def get_current_history_length ( ) : <EOL> """<STR_LIT>""" <EOL> return Readline . getHistorySize ( ) </s>
