osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help with tkinter


On 2019-08-09 12:43:45 -0600, Michael Torrie wrote:
> On 8/9/19 4:52 AM, Peter J. Holzer wrote:
> > You didn't import 'tkinter', you imported all symbols ('*') from
> > tkinter. So, since you imported colorchooser, you can call 
> > colorchooser.askcolor() (not tkinter.colorchooser.askcolor())
> 
> The better thing to do is remove the import * line and just "import
> tkinter" and then make sure all your calls to tkinter objects are fully
> qualified with the "tkinter." part like you've already been doing.

Agreed.

        hp

-- 
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp at hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20190809/d232b062/attachment.sig>