WEB开发网
开发学院软件开发Python 使用IPython增强交互式体验 阅读

使用IPython增强交互式体验

 2008-09-30 12:44:29 来源:WEB开发网   
核心提示: Please read the sections 'Initial Configuration' and 'Quick Tips' in theIPython manual (there are both HTML and PDF versions supp

Please read the sections 'Initial Configuration' and 'Quick Tips' in the

IPython manual (there are both HTML and PDF versions supplied with the

distribution) to make sure that your system environment is properly configured

to take advantage of IPython's features.

Please press to start IPython.

总结一下安装过程:

* 下载合适的软件包。

* 解压缩。

* 运行python setup.py install

就象上面提到的,启动IPython就是运行可执行文件ipython。你会看到一个提示符,如果你曾经玩过标准Python命令行提示符,你会发现这个有点儿不同:

[jjones@cerberus ~]$ /usr/local/python24/bin/ipython

Python 2.4 (#2, Nov 30 2004, 09:22:54)

Type "copyright", "credits" or "license" for more information.

IPython 0.6.6 -- An enhanced Interactive Python.

? -> Introduction to IPython's features.

%magic -> Information about IPython's 'magic' % functions.

help -> Python's own help system.

object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]:

要退出IPython(Linux系统上)就输入Ctrl-D(会要求你确认),也可以输入Exit或Quit(注意大小写)退出而不需要确认。

特性

Magic

IPython有一些"magic"关键字:

%Exit, %Pprint, %Quit, %alias, %autocall, %autoindent, %automagic,

%bookmark, %cd, %color_info, %colors, %config, %dhist, %dirs, %ed,

上一页  1 2 3 4 5 6 7 8  下一页

Tags:使用 IPython

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接