python - Linux - IPython 中的换行符

标签 python linux shell ipython line-breaks

大家好,我是 Linux 的新手,我非常喜欢在 shell 中编写和测试 python 代码的想法。但我的问题是如何在 IPython 中进行换行。每次我使用(我认为)“正常”快捷键 shift+enter 时,代码都会被执行。功能键被禁用,键盘布局在我的笔记本电脑上工作正常,可能是什么问题?

最佳答案

我刚遇到一个解决方案,由 Kenneth Falck 发布: IPython newlines with ^V^J

在编辑多行代码块时使用 Ctrl+V CTRL+J

关于python - Linux - IPython 中的换行符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9991838/

相关文章:

Python 正则表达式没有按预期工作

python - 如何知道用 pandas 用 python 完成的图表的图形引用?

python - res_similarity() 函数的参数

node.js - 在开始我的项目之前,我首先需要 docker 环境吗?

linux - 如何找到在另一个文件 X 分钟内创建的文件?

python - Apache Airflow -mysql 'Specified key was too long; max key length is 1000 bytes'

linux - 一个进程如何尝试访问Linux虚拟内存系统中其他进程的内存

c - 函数 ‘sched_setaffinity’ 的隐式声明

android - 如何使用 adb shell 控制蓝牙操作?

c - 管道末端重定向(C shell)