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

查看:178
本文介绍了在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天全站免登陆