简体   繁体   English

在macOS上打开python文件时空白的python空闲窗口

[英]Blank python IDLE window when opening python file on macOS

For some reason, whenever I try to open a python script that has around ~450 lines of code, IDLE's windows simply appears empty and when I try to run it doesn't run anything either... However, if I try to run a smaller program it works for some reason. 出于某种原因,每当我尝试打开包含约450行代码的python脚本时,IDLE的窗口都将显示为空,并且当我尝试运行它时也不会运行任何内容...但是,如果我尝试运行一个较小的程序,它由于某种原因起作用。 Does anybody know how I am able to run a python script on my Mac besides IDLE or how to fix the IDLE window being blank whenever I open a file? 除了打开IDLE之外,有人知道我如何在Mac上运行python脚本,或者每次打开文件时如何修复IDLE窗口为空白?

To learn how to run Python Python programs on a Mac, read Chapters 1 and 4 of Python Setup and Usage . 要了解如何在Mac上运行Python Python程序,请阅读Python设置和用法的第1章和第4章。 Running from an IDLE editor is just one way. 从IDLE编辑器运行只是一种方法。

IDLE uses the tkinter module which wraps the tcl/tk GUI framework. IDLE使用tkinter模块包装了tcl / tk GUI框架。 Did you read and follow the instructions of how to replace the buggy tcl/tk that Apple supplies? 您是否阅读并遵循了有关如何更换Apple提供的越野车tcl / tk的说明? Read the entire page before starting! 开始之前请阅读整个页面! Ignoring this page is the most common reason people have problems with IDLE on the Mac. 忽略此页面是人们在Mac上遇到IDLE问题的最常见原因。 There are a few others, but I do not remember one that matches your description. 还有其他一些,但我不记得有一个与您的描述相符的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM