Command Auto-complete module rlcomplete

Source: Internet
Author: User

Rlcomplete defines the command auto-complement function for the ReadLine module.

When the module is imported under the UNIX platform (provided that the ReadLine module is available), an instance of complete is automatically generated and its complete () method is set to ReadLine's auto-completion function.
    For example:
  1.  >>> import   Rlcompleter  >>>import   ReadLine  >>> readline.parse_and_bind ( tab:complete   )  >>> Readline.<tab pressed>readline.  __doc__   Readline.get_line_buffer (Readline.read_init_file (readline.  __file__   Readline.insert_text (Readline.set_completer (readline.  __name__   Readline.parse_and_bind ( >>> readline. 
      The   Rlcomplete module is designed to be used in Python interactive mode, and the user can add the following commands to the Python initialization file (determined by the environment variable Pythonstartup) so that you can use the TAB key to get the completion command automatically.
    1.  Span style= "color: #0000ff;" >try  :  import   Readlineexceptimporterror:  print   "  module readline not available.   " else  :  import   Rlcompleter Readline.parse_and_bind ( "  tab:complete  ) 
Complete object The complete object has the following methods:         completer.complete (text, state): Returns the status code for the auto-complete command.

Command Auto-complete module rlcomplete

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.