Skip to content

Tag: tkinter

Display/Update score on python using tkinter

I’m making an arcade game using tkinter GUI, that as most arcades, needs a score display on screen that updates every time the user kills an enemy (obviously). I am doing it by creating a text on a canvas, and calling a function that creates another one, but this time with the score value (Which is a gl…

NameError: global name ‘END’ is not defined

I have found this code about scrollbar is just working fine. I try to use it in my code like this: But when I ran above code, I got an error on insertion line. By the way, I tried to find documentation and a link from effbot is the closest I got but still couldn’t understand what is wrong. Answer

_tkinter TclError: can’t find package Tix

A friend sent me some Tkinter/Tix code, but it was for Python 2: I have Python 3, I have no Tix installed, and program crashes. After some searching I’ve changed the code to: Thats what I found on the internet. I have no idea if this is a right approach. But code still does no run it crashes on I

Tkinter importing without *?

In my past programming i used the following code: but someone told me that importing * was not good for many reasons but now when i want to import it says geometry not a module thing (name). and when i do: it says ‘module’ object has no attribute ‘geometry’ Can someone explain me how t…

python pack() and grid() methods together

Im new to python so please forgive my Noob-ness. Im trying to create a status bar at the bottom of my app window, but it seems every time I use the pack() and grid() methods together in the same file, the main app window doesn’t open. When I comment out the line that says statusbar.pack(side = BOTTOM, f…