错误13权限被拒绝

时间:2016-02-18 20:39:08

标签: python-2.7 zelle-graphics

我正在尝试使用Zelle Graphics编写一个简单的温度转换器GUI,每次运行模块时都会弹出一个窗口,显示错误消息

[Errno 13] Permission Denied

这是我的代码和我拥有的代码。请帮忙。此外,当您运行代码我正在尝试获取代码,您可以单击某个区域(转换框),代码将继续运行。

# tempConverter-GUI
# Converts C to F using a simple GUI
# 2/17/16

from graphics import *

win = GraphWin("Temperature Converter", 300, 200)

c = Text(Point(100, 50), "Celsius Temperature: ")
c.draw(win)

cTemp = Entry(Point(200, 50), 5)
cTemp.setText("0.0")
cTemp.draw(win)

f = Text(Point(100, 150), "Fahrenheit Temperature: ")
f.draw(win)

convertedText = Text(Point(200, 150), "")
convertedText.draw(win)

box = Rectangle(Point(79, 69), Point(225, 123))
box.setWidth(10)
box.setFill("white")
box.draw(win)

button = Text(Point(150, 100), "CONVERT IT!")
button.draw(win)

location = win.getMouse()


fahrenheit = 9/5.0 * float(cTemp.getText()) + 32

convertedText.setText(fahrenheit)
button.setText("QUIT")
location = win.getMouse()

win.close()

0 个答案:

没有答案