python的交互式shell-ipython体验
Posted xiaochina
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python的交互式shell-ipython体验相关的知识,希望对你有一定的参考价值。
ipython的python比较优秀的交互式shell,比python console功能更加强大更加的贴近开发及调试程序,也支持在linux下直接执行linux命令
00x-install
源码安装
https://github.com/ipython/ipython/releases
IPython versions and Python Support
IPython 7.0 requires Python version 3.5 and above.
IPython 6.x requires Python version 3.3 and above.
IPython 5.x LTS is the compatible release for Python 2.7. If you require Python 2 support, you must use IPython 5.x LTS. Please update your project configurations and requirements as necessary.
ipython-7.5.0.tar.gz //本机测试的python3.6环境下的ipython
python3 setup.py install //安装库文件到site-packages及scripts/ipython
pip安装
pip3 install ipython //注意配置下pip国内源
注意:通过yum/apt也是可以安装ipython
01x-experience
tab自动补全
ipython内置魔法函数
%lsmagic //查看所有内置魔法函数 %alias? //查看函数的帮忙文档
应用例子
以上是关于python的交互式shell-ipython体验的主要内容,如果未能解决你的问题,请参考以下文章