Ask coding questions

← Back to all posts
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

from tkinter import *
window = Tk()

cant run

Answered by malvoliothegood (174) [earned 5 cycles]
View Answer
fzt (7)
malvoliothegood (174)

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.

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

malvoliothegood (174)

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 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.

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