page 如果正在处理的对象表示起来非常复杂冗长,一屏甚至几屏都显示不完。
可以使用魔力函数 page 解决。很像 shell 里的 less 命令
pdef 简单的理解为 print def。打印函数声明部分,即使函数源代码不可用,只要能够访问.pyc 或者 egg 文件就可以正常使用。

可以看到函数的声明部分被显示了出来。
pdoc 简单的理解为 print document。打印函数注释文档,接上面的函数。

pfile 能够运行对象的原文件。当然前提是要有文件,已经包成 .pyc 且仅有 .pyc 的自然不行了。 这是 import os pfile os 的结果。

也是用 less 的方法打开的。q键退出。
?? 全功能。包括之前所有的 pdef pdoc pfile 的信息,没有特别需求推荐用这个就好。

================================================== whos 虽然 who who_ls 都是主要列出了可以交互的对象。但是 whos 魔力函数输出友好些。

无需多言,大家基本上能看到 whos 命令的用法了。 我们可以通过这个魔力函数查找需要的信息。 这对于需要知道当前定义过哪些对象的情况非常适用。
================================================== hist 我们都知道可以查看 bash 的历史命令。ipython也可以查询历史

比较特殊的是 -g 选项,可以查询全部历史中的关键字。效果如上。
================================================== 这节太枯燥了,写到后面都有点觉得无聊了,估计也没啥人看。。。终于结束了这一章,魔力函数还有很多,大家感兴趣可以自己找找看。我们马上进入到下一章: "文本"