使用 Ctrl-X 从 IPython shell 剪切文本被破坏

发布于 2024-08-07 13:35:11 字数 165 浏览 7 评论 0原文

我非常频繁且愉快地使用 IPython。不知何故,使用键盘快捷键 Ctrl + X 从 shell 剪切文本已被破坏。实际上,我有几个不同的 IPython 安装。在某些安装中,快捷方式有效;在其他情况下,它不起作用。

这可能是什么原因?我应该去哪里调查?

I use IPython very frequently and happily. Somehow, cutting text from the shell using the keyboard shortcut, Ctrl + X, is broken. Actually, I have a few different installations of IPython. In some of the installations, the shortcut works; in the others, it doesn't work.

What might be the reason for this? Where should I look into?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冷了相思 2024-08-14 13:35:11

你说你安装了多个实例——这些实例都在不同的机器上吗?他们运行什么操作系统?如果您远程访问它们,您正在运行什么操作系统?

你使用 ssh 访问它们吗?您是否在本地或远程或两者都运行屏幕之类的东西?有很多事情可能会干扰您的终端设置,尤其是当您远程工作时。

我几乎可以肯定 iPython 与它没有任何关系——尽管您可能想检查版本号,看看工作环境和非工作环境是否运行不同的版本。

更有可能的是,它是终端仿真层中的某些东西,但您可能必须自己做一些侦探工作才能找出导致它的部分。

一步一步地进行——尝试从本地 shell 中切入,以确保其有效。然后连接到远程计算机,并从 那个 shell 中进行剪切。启动屏幕(如果这是您正常的做事方式),然后从那个 shell 进行测试。然后启动ipython。如果它停在那里,那么看看是否可以在同一台机器上找到另一个与 gnu readline 链接的应用程序,然后尝试一下。您可能会发现所有控制台应用程序都无法在该计算机上正确切换,或者您可能会发现它们可以工作,但不能在屏幕下工作。或者您可能会发现,一旦您通过 ssh 登录,终端设置中的某些内容就会停止所有操作。

您也可能有一些运气。如果您可以通过将 termcap 文件从工作计算机复制到不工作的计算机来找出远程计算机认为您正在使用的终端( echo $TERM )。不过,这些论坛涉及的内容更多一些——我会在 serverfault.com 或 superuser.com 上重新发布,

我希望这至少为您提供了一个起点——终端很挑剔,而且很难正确使用。大多数人似乎并不介意,只要一切大部分都能正常工作即可。

You say you have multiple instances installed -- are these all on different machines? What operating system(s) are they running? If you access them remotely, what operating system are you running?

Do you get to them using ssh? Do you run something like screen, either locally or remotely, or both? There are lots of things that can interfere with your terminal settings, especially when you're working remotely.

I'm almost certain that iPython doesn't have anything to do with it -- though you might want to check the version numbers, to see if working and non-working environments are running different versions.

More likely, it is something in the terminal emulation layer, but you'll likely have to do some detective work of your own to find out what piece is causing it.

Take it one step at a time -- try to cut from a local shell, to make sure that works. Then connect to a remote machine, and cut from that shell. Start screen, if that's your normal way of doing things, and test from that shell. Then start ipython. If it stops there, then see if you can find another application on the same machine that's linked against gnu readline, and try that. You may find that none of the console apps cut proplerly on that machine, or you may find that they work, but not under screen. Or you may find that something in the terminal settings stops everything from working as soon as you ssh in.

You may also have some luck. if you can find out what terminal the remote machine thinks you are using ( echo $TERM ) by copying the termcap file from a working machine to one that doesn't. That's a bit more involved for these forums, though -- I'd repost at that point on serverfault.com or superuser.com

I hope that at least gives you a starting place -- terminals are finicky, and difficult to get right. Most people seem to not bother, as long as everything mostly works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文