Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我过去使用过 IPython,我曾经能够复制和粘贴多行命令,例如forIPython 中的循环。在安装 Python(x,y) 2.7.2.1 后在我的新 PC 中工作时,我可以使用右键单击 → 编辑 → 粘贴来粘贴多行代码段,但不能像以前那样使用CTRL+ P。使用CTRL+时,P仅粘贴多行代码段的第一行。有人可以帮忙吗?我查看了设置和文档无济于事。
for
在 IPython 命令行中键入 %paste。
您可以使用%cpasteIPython shell(这也是 Django 的管理 shell 使用的)。如果您想了解更多功能,请键入%quickref。
%cpaste
%quickref