help with tkinter

Ahmad Adam Kabbara kabbaraahmadadam at gmail.com
Fri Aug 9 03:40:05 EDT 2019


   I one more thing I am using python 3

   Sent from my Huawei Mobile

   -------- Original Message --------
   Subject: Re: help with tkinter
   From: Ahmad Adam Kabbara <kabbaraahmadadam at gmail.com>
   To: Wildman <best_lay at yahoo.com>
   CC: python-list at python.org

     so when I write**from
     tkinter import*
     t=Tk()
     tkinter.colorchooser.askcolor()
     I get this error message
     Traceback (most recent call last):
     ** File "C:\Users\kabba\Desktop\color and coordinates.py", line 3, in
     <module>
     ****** tkinter.colorchooser.askcolor()
     NameError: name 'tkinter' is not defined
     I also tried another way**
     from tkinter.colorchooser import*
     colorchooser.askcolor()
     and I also got an error message
     Traceback (most recent call last):
     ** File "<pyshell#1>", line 1, in <module>
     ****** colorchooser.askcolor()
     NameError: name 'colorchooser' is not defined
     the only time it worked is when I typed**
     from tkinter import colorchooser
     colorchooser.askcolor()
     On Thu, Aug 1, 2019 at 7:30 PM Rhodri James <[1]rhodri at kynesim.co.uk>
     wrote:

       Hi there, Adam!

       On 01/08/2019 14:31, adam kabbara wrote:
       > Hello I am having trouble with tkinter when I enter the command from
       tkinter import* I get an error message

       What *exactly* did you type?** Please cut-and-paste from your
       console/editor into the email, don't just retype it.** If you did
       literally type "from tkinter import*" then Python is probably
       complaining that it doesn't know what "import*" means because you
       missed
       out a space!

       Also, what *exactly* was the error message?** Again, please
       cut-and-paste.** Python usually gives you a pretty good indication of
       what you did wrong; if you show us, we can help you get used to
       interpreting it for yourself.

       Happy coding!

       --
       Rhodri James *-* Kynesim Ltd
       --
       [2]https://mail.python.org/mailman/listinfo/python-list

     On Fri, Aug 2, 2019 at 12:11 AM Wildman via Python-list
     <[3]python-list at python.org> wrote:

       On Thu, 01 Aug 2019 16:31:02 +0300, adam kabbara wrote:

       > Hello I am having trouble with tkinter when I enter the command from
       tkinter import* I get an error message
       >

       What was the error and what version of Python are
       you using?

       For Python 2 you need... from Tkinter import*

       --
       <Wildman> GNU/Linux user #557453
       "There are only 10 types of people in the world...
       those who understand Binary and those who don't."
       ** -Spike
       --
       [4]https://mail.python.org/mailman/listinfo/python-list

References

   Visible links
   1. mailto:rhodri at kynesim.co.uk
   2. https://mail.python.org/mailman/listinfo/python-list
   3. mailto:python-list at python.org
   4. https://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list