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 <rho...@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 > -- > https://mail.python.org/mailman/listinfo/python-list > On Fri, Aug 2, 2019 at 12:11 AM Wildman via Python-list < python-list@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 > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list