error 13 permission denied

121 Views Asked by At

I am trying to write a simple temperature converter GUI using Zelle Graphics and each time I run the module a window pops up showing an error message saying

[Errno 13] Permission Denied

Here is my code and what I have. Please help. Also when you run the code I am trying get the code where you can click on a certain area (the convert box) and the code will continue to run.

# 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

There are 0 best solutions below