在PyCharm下使用 ipython 交互式编程的方法
作者:loseyetgain 时间:2021-05-06 11:12:01
目的:方便调试,查看中间结果,因为觉得设断点调试相对麻烦。
【运行环境:macOS 10.13.3,PyCharm 2017.2.4】
老手:
选中代码行,Alt+Shift+E。
或选中,鼠标右键-Execute Line in Console。
新手:
1、安装 ipython 之后,查看 PyCharm 设置,确保 Console 的通用设置 Use IPython if available 选项打勾。
我没有设置,装完 ipython 后默认如此。
2、打开 Python Console 窗口(Tools-Python Console),屏幕下方就可见 ipython 的交互式界面了。
3、选中代码行,一行、多行皆可。然后鼠标右键,点选 Execute Line in Console。
(注:macOS版的快捷键是Alt+Shift+E,window版一般都会不一样。)
代码被自动复制到 IPthon 交互界面执行,然后返回执行结果。
来源:https://blog.csdn.net/u013747832/article/details/79598810
标签:PyCharm,ipython,交互式
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Go语言中的闭包详解
2023-06-30 05:27:14
在CMD命令行中运行python脚本的方法
2023-08-03 18:54:38
![](https://img.aspxhome.com/file/2023/9/60939_0s.jpg)
laravel修改用户模块的密码验证实现
2023-06-14 12:37:18
SQL Server视图管理中的四个限制条件
2009-03-06 14:24:00
pytest使用parametrize将参数化变量传递到fixture
2022-03-28 23:30:18
Oracle查看逻辑读、物理读资源占用排行的SQL语句
2023-06-25 23:53:53
页面新开窗口的一点补充
2008-09-10 12:57:00
oracle 合并查询 事务 sql函数小知识学习
2023-07-13 15:07:28
Python 制作查询商品历史价格的小工具
2021-10-13 06:03:16
![](https://img.aspxhome.com/file/2023/3/84883_0s.png)
Python编译为二进制so可执行文件实例
2023-03-05 06:30:36
asp当中判断函数一览
2010-05-27 12:15:00
CSS教程:轻松解决表格的nobr问题
2008-10-29 11:55:00
Python数据分析之 Matplotlib 折线图绘制
2023-12-05 02:18:13
![](https://img.aspxhome.com/file/2023/2/83902_0s.webp)
Python响应对象text属性乱码解决方案
2023-07-31 13:06:41
![](https://img.aspxhome.com/file/2023/0/61170_0s.png)
go流程控制代码详解
2023-10-15 18:14:19
python 基于空间相似度的K-means轨迹聚类的实现
2022-10-24 07:29:02
![](https://img.aspxhome.com/file/2023/4/90294_0s.png)
ASC码对照表
2008-08-07 13:07:00
你知道怎么在淘宝里进行投诉吗?
2008-06-04 12:00:00
![](https://img.aspxhome.com/file/UploadPic/20086/4/2008641267329s.jpg)
MySQL表设计优化与索引 (四)
2010-10-25 19:50:00
PyTorch中的CUDA的操作方法
2022-02-24 18:54:41
![](https://img.aspxhome.com/file/2023/2/77722_0s.png)