Ask coding questions

← Back to all posts
1
does tkinter work today?
fzt (7)

I super need tkinter but it doesn't work i suppose
tkinter cant run If i add something to example code
even

from tkinter import *
window = Tk()
window.mainloop()

cant run

Answered by malvoliothegood (83) [earned 5 cycles]
View Answer
Voters
fzt (7)
Commentshotnewtop
1
malvoliothegood (83)

When I run the code you have in your question I see a grey rectangle. This is the expected behaviour. If you want something else to appear you need to add extra code, like there is in the examples.

1
fzt (7)

@malvoliothegood it's interesting that at home i can run the app, but can't at my university
and yes rectangle is expected but i only see "run your repl to see output" changing to repl logo over and over

1
malvoliothegood (83)

@fzt
What browser are using using? It may be the one you have at home is different to the other one you use (at school?).

Also repl.it is "faking" the output as their IDE is basically a web app and these don't have access to the same graphics context to draw on as the context a gui application on your computer has. If you want a decent experience install Python on your PC and run it from the command line/terminal.

1
fzt (7)

@malvoliothegood I'm using Chrome, by the way, I downloaded tkinter to my computer, but my stupid university got Python, maybe a week ago, and I noticed it yesterday
But it would be great if I could also make my application in Repl