使用IPython增强交互式体验
2008-09-30 12:44:29 来源:WEB开发网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,
更多精彩
赞助商链接