我是 Python 新手,正在尝试使用 John Zelle 的graphics.py. 我正在 MacVim 中编写 Python 脚本,并在 Python 3 上从终端 (Mac OS 10.9.2) 执行。如果我尝试打开一个新窗口,GraphWin()该窗口短暂打开但随后立即关闭。
前任:
from graphics import *
win = GraphWin("circle",500,500)
c = Circle(point(100,100),30)
c.draw(win)
Run Code Online (Sandbox Code Playgroud)
带有 TkInter 的 GUI 元素工作得很好。任何想法为什么会发生这种情况?
谢谢!