构建交互式命令行的Python工具箱:Python Prompt Toolkit

jopen 9年前

Python Prompt Toolkit 是构建强大的交互式命令行的Python工具箱。

prompt_toolkit可以作为 GNU readline,的替代品,但它可以做的更多。

 

一些特性:

  • Pure Python.
  • Syntax highlighting of the input while typing. (For instance, with a Pygments lexer.)
  • Multi-line input editing.
  • Advanced code completion.
  • Both Emacs and Vi key bindings. (Similar to readline.)
  • Reverse and forward incremental search.
  • Runs on all Python versions from 2.6 up to 3.4.
  • Works well with Unicode double width characters. (Chinese input.)
  • Selecting text for copy/paste. (Both Emacs and Vi style.)
  • Multiple input buffers.
  • No global state.
  • Lightweight, the only dependencies are Pygments, six and wcwidth.
  • Code written with love.
  • Runs on Linux, OS X, OpenBSD and Windows systems.

项目主页:http://www.open-open.com/lib/view/home/1438505084316