I need help with making my claculator
Peter Otten
__peter__ at web.de
Mon May 22 02:44:52 EDT 2017
woooee at gmail.com wrote:
> First, you have to have a Tk instance before you do anything else. Take a
> look at this example, and then expand upon it to create the calculator
> http://python-textbok.readthedocs.io/en/1.0/Introduction_to_GUI_Programming.html
While I agree that creating a Tk instance explicitly is preferable tkinter
will create one if you don't:
>>> import tkinter
>>> tkinter._default_root is None
True
>>> frame = tkinter.Frame()
>>> tkinter._default_root
<tkinter.Tk object at 0x7f751b0c65f8>
>>> frame.master is tkinter._default_root
True
More information about the Python-list
mailing list