为什么我在 Mac 上键入括号时 Python 的 IDLE 会崩溃? [英] Why does Python's IDLE crash when I type a parenthesis on Mac?

查看:27
本文介绍了为什么我在 Mac 上键入括号时 Python 的 IDLE 会崩溃?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我意识到这可能是一个非常微妙的问题,但它一直困扰着我一段时间.我喜欢 IDLE 的简单脚本界面,但在以下情况下它总是崩溃:(1)我在外接显示器上编码,(2)我键入括号按钮(".IDLE 永远不会因为任何其他原因而崩溃比这种非常特殊的情况.奇怪的是,如果我连接了外接显示器,但我的笔记本电脑的主屏幕上有 IDLE dev 窗口,我的崩溃问题为零.(???)由于我丢失了大量代码解决这个问题.

Ok, I realize this may be an extremely nuanced question, but it has been bugging me for a while. I like the simple scripting interface of IDLE, but it keeps crashing on me when: (1) I am coding on an external monitor and (2) I type the parenthesis button, "(". IDLE never crashes for me for any other reason than this very specific situation. Strangely, if I have an external monitor connected, but I have the IDLE dev window on my laptop's main screen, I have ZERO problems with crashing. (???) I have lost a substantial amount of code due to this problem.

我在 Mac OSX 版本 10.11.3 上运行,我有一台 MacBook Pro(Retina,15 英寸,2015 年中)任何想法都将不胜感激!

I am running on Mac OSX Version 10.11.3 and I have a MacBook Pro (Retina, 15-inch, Mid 2015) Any thoughts would be appreciated!

推荐答案

好的,回答我自己的问题.根据 Андрей 的建议,我在这里查看了注释和评论:http://bugs.python.org/issue16177 我做了一些实验并想出了一个解决方法来避免这个问题.仅当您在外部显示器中编码并且外部显示器的排列"设置为相对于主显示器更高(或升高)时,才会出现此问题.具体来说,当 IDLE 开发窗口完全或几乎完全位于辅助屏幕上的某个空间中时,就会发生这种情况,该空间将被视为主屏幕上边缘的北".因此,该补丁将重新配置 Mac 上的排列"设置,以便显示器以接近水平的方式系统对齐.这可能会让事情变得不那么自然,但它会解决问题.话虽如此,我不知道问题的根本原因是什么.我很高兴终于解决了这个问题.希望这至少可以帮助另一个人.

Ok, answering my own question. Per the recomendation of Андрей, I reviewed the notes and comments here: http://bugs.python.org/issue16177 I did some experimentation and figured out a work-around to avoid this problem. The problem only occurs when you are coding in an external monitor AND when the "Arrangement" of the external monitor is set as being higher (or elevated) relative to the primary monitor. Specifically, it occurs when the IDLE development window is totally or near-totally in a space on the secondary screen that would be considered "North" of the top edge of the primary screen. Thus, the patch is to reconfigure your "Arrangement" settings on your Mac so that the monitors are systematically aligned in a near-horizontal fashion. This may make things feel less natural, but it will fix the problem. That being said, I have no idea what the root cause of the problem is. I'm just glad to finally have this figured out. Hope this helps at least one other person.

这篇关于为什么我在 Mac 上键入括号时 Python 的 IDLE 会崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆