How do I compile my Python 3 app to an .exe? [closed]

cx_Freeze does this but creates a folder with lots of dependencies. py2exe now does this and, with the –bundle-files 0 option, creates just one EXE, which is probably the best solution to your question. UPDATE: After encountering third-party modules that py2exe had trouble “finding”, I’ve moved to pyinstaller as kotlet schabowy suggests below. Both have … Read more

How to get the Tkinter Label text?

To get the value out of a label you can use the cget method, which can be used to get the value of any of the configuration options. For example: l = tk.Label(text=”hello, world”) … print(“the label is”, l.cget(“text”)) You can also treat the object as a dictionary, using the options as keys. Using the … Read more

How to change the foreground or background colour of a selected cell in tkinter treeview?

@BryanOkley shared that one cannot change the color of an individual cell in ttk.Treeview. So I explored using tk.Canvas() and tk.Canvas.create_text() to create the illusion of changing the color of a selected cell in a ttk.Treeview() widget. I was fortunate to come by j08lue/ttkcalendar.py which had the same objective and I adapted from it. My … Read more

Tkinter ttk see custom theme settings

Offical list of all options by ttk finally found a list that includes all coloration options to style with ttk. https://wiki.tcl-lang.org/page/Changing+Widget+Colors ttk.Button ttk::style configure TButton -background color ttk::style configure TButton -foreground color ttk::style configure TButton -font namedfont ttk::style configure TButton -focuscolor color ttk::style map TButton -background \ [list active color disabled color readonly color] ttk::style … Read more