无法将代码复制到Windows上的ipython3中

发布于 2025-01-18 14:02:21 字数 465 浏览 2 评论 0原文

假设我想将代码复制并粘贴到 Windows 上的 ipython3 终端中。这是通常发生的情况:

在此处输入图像描述

在此处观看视频:https://youtu.be/-cMsy8sEXE0

正如你所看到的,出现了这些 ^M 字符,但我不知道它们是什么。有趣的是,正如您在视频中看到的,从 Excel 与记事本复制和粘贴的结果并不相同。知道这里发生了什么吗?我唯一的选择是编写一个自动热键脚本来修改剪贴板的内容以粘贴 ipython3.exe 可以理解的内容吗?

Suppose I want to copy and paste code into the ipython3 terminal on Windows. This is what usually happens:

enter image description here

See a video here: https://youtu.be/-cMsy8sEXE0

As you can see, there are these ^M characters appearing, and I have no idea what they are. Interestingly, as you can see in the video, the results are not the same when copying and pasting from Excel vs. Notepad. Any idea what is happening here? Is my only bet to write an autohotkey script that modifies the contents of the clipboard to paste something ipython3.exe can understand?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文