红联Linux门户
Linux帮助

IPython 5.4.0和6.1.0发布,Python命令行交互

发布时间:2017-06-02 09:06:38来源:红联作者:baihuo
IPython 5.4.0 和 6.1.0 发布了,有如下更新:

5.4.0

IPython 5.4-LTS 支持在 IPython 6.0 和 6.1 中创建的大部分新的暴露的 API 添加,并避免根据 IPython 的版本编写条件逻辑。

6.1.0

Quotes in a filename are always escaped during tab-completion on non-Windows.

Variables now shadow magics in autocompletion.

Added the ability to add parameters to alias_magic. For example:

In [2]: %alias_magic hist history --params "-l 2" --line
Created `%hist` as an alias for `%history -l 2`.

In [3]: hist
%alias_magic hist history --params "-l 30" --line
%alias_magic hist history --params "-l 2" --line

Previously it was only possible to have an alias attached to a single function, and you would have to pass in the given parameters every time:

In [4]: %alias_magic hist history --line
Created `%hist` as an alias for `%history`.

In [5]: hist -l 2
hist
%alias_magic hist history --line

To suppress log state messages, you can now either use %logstart -q, pass--LoggingMagics.quiet=True on the command line, or set c.LoggingMagics.quiet=True in your configuration file.

An additional flag --TerminalInteractiveShell.term_title_format is introduced to allow the user to control the format of the terminal title. It is specified as a python format string, and currently the only variable it will format is {cwd}.

??/%pinfo2 will now show object docstrings if the source can’t be retrieved.

IPython.display has gained a %markdown cell magic.

%config options can now be tab completed.

%config with no arguments are now unique and sorted.

Completion on keyword arguments does not duplicate = sign if already present.

%run -m now passes extra arguments to .

completer now understand “snake case auto complete”: if foo_bar_kittens is a valid completion, I can type f_b will complete to it.

tracebacks are better standardized and will compress /path/to/home to ~.

IPython 是 Python 的原生交互式 shell 的增强版,可以完成许多不同寻常的任务,比如帮助实现并行化计算;主要使用它提供的交互性帮助,比如代码着色、改进了的命令行回调、制表符完成、宏功能以及改进了的交互式帮助。

软件详情:http://blog.jupyter.org/2017/05/31/release-of-ipython-5-4-6-1-and-rlipython-2/

下载地址:https://github.com/ipython/ipython/releases

来自:开源中国社区
文章评论

共有 0 条评论