Python-Prompt-Toolkit v1.0.4发布
jopen 8年前
<p style="text-align: center;"><img alt="" src="https://simg.open-open.com/show/ec1a88dc0c96c34a67048d410b0496e4.png" /></p> <p>Python-Prompt-Toolkit是一个用于构建强大的交互式 Python 命令行环境的库。用好了就变成了 Python 中的 Vim 。</p> <p>特性:</p> <ul> <li> <p>纯 Python.</p> </li> <li> <p>输入时语法高亮</p> </li> <li> <p>多行输入编辑</p> </li> <li> <p>高级代码补全Advanced code completion.</p> </li> <li> <p>Emacs 和 Vi 键绑定(类似 readline)</p> </li> <li> <p>反向和正向增量搜索</p> </li> <li> <p>可在 Python 2.6 至 3.4 版本运行</p> </li> <li> <p>Unicode 双宽字符(中文输入)运行效果很好 。</p> </li> <li> <p>可选文本复制/粘贴 (Both Emacs and Vi style.)</p> </li> <li> <p>多输入缓冲</p> </li> <li> <p>没有全局的状态</p> </li> <li> <p>轻量级,唯一的依赖是 Pygments,six 和 wcwidth</p> </li> <li> <p>用心写的代码</p> </li> <li> <p>可在 Linux, OS X, OpenBSD 和 Windows 运行</p> </li> </ul> <h2>更新日志</h2> <p>Bug修复:<br /> - Key binding fixes:<br /> * Improved handling of repeat arguments in Emacs mode. Pressing sequences<br /> like 'esc---123' do now work (like GNU Readline):<br /> - repetition of the minus sign is ignored.<br /> - No esc prefix is required for each digit.<br /> * Fix in ControlX-ControlX binding.<br /> * Fix in bracketed paste.<br /> * Pressing Control-U at the start of the line now deletes the newline.<br /> * Pressing Control-K at the end of the line, deletes the newline after<br /> the cursor.<br /> * Support negative argument for Control-K<br /> * Fixed cash when left/right were pressed with a negative argument. (In<br /> Emacs mode.)<br /> * Fix in ControlUp/ControlDown key bindings.<br /> * Distinguish backspace from Control-H. They are not the same.<br /> * Delete in front of the cursor when a negative argument has been given<br /> to backspace.<br /> * Handle arrow keys correctly in emacs-term.<br /> - 性能优化:<br /> * Performance optimization in Registry.<br /> * Several performance optimization in filters.<br /> * Import asyncio inline (only if required).<br /> - Use the best possible selector in the event loop. This fixes bugs in<br /> situations where we have too many open file descriptors.<br /> - Fix UI freeze when gevent monkey patch has been applied.<br /> - Fix segmentation fault in Alpine Linux. (Regarding the use of ioctl.)<br /> - Use the correct colors on Windows. (When the foreground/background colors<br /> have been modified.)<br /> - Display a better error message when running in Idle.<br /> - Additional flags for vt100 inputs: disable flow control.<br /> - Also patch stderr in CommandLineInterface.patch_stdout_context.</p> <p>新特性:<br /> - Allow users to enter Vi digraphs in reverse order.<br /> - Improved autocompletion behaviour. See IPython issue #9658.<br /> - Added a 'clear' function in the shortcuts module.</p> <p>对将来的兼容性:<br /> - `Keys.Enter` has been added. This is the key that should be bound for<br /> handling the enter key.</p> <p> Right now, prompt_toolkit translates \r into \n during the handling of the<br /> input; this is not correct and makes it impossible to distinguish between<br /> ControlJ and ControlM. Some applications bind ControlJ for custom handling of<br /> the enter key, because this equals \n. However, in a future version we will<br /> stop replacing \r by \n and at that point, the enter key will be ControlM. <br /> So better is to use `Keys.Enter`, which becomes an alias for whatever the<br /> enter key translates into.<br /> </p> <h2>下载</h2> <ul> <li><a href="/misc/goto?guid=4958992875232139328" rel="nofollow"><strong>Source code</strong> (zip)</a></li> <li><a href="/misc/goto?guid=4958992875351587730" rel="nofollow"><strong>Source code</strong> (tar.gz)</a></li> </ul> <p> </p> <p>本站原创,转载时保留以下信息:<br /> 本文转自:深度开源(open-open.com)<br /> 原文地址:<a href="http://www.open-open.com/news/view/2d7b5519">http://www.open-open.com/news/view/2d7b5519</a></p> <h2> </h2>