![]() |
[Tkinter] button not defined - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: [Tkinter] button not defined (/thread-14253.html) |
button not defined - OldManProgrammer - Nov-21-2018 Hello, I am brand new to Pyton. I am using 3.7.1 for windows. I am getting an error (NameError: name 'button' not defined) from the statement below. button1=button(app, test = "this is a button") I noticed that python was installed pretty deep in the file structure of my computer, many folders deep. From the commmand window I can run python so I know my pathing is setup. I looked for the subfunction (I don't know what else to call it, I am brand new) called button and I found it. But is seems python is not able to find it and call it. Anyone have any insite on how to fix my issue? ![]() Thank you in advance. RE: button not defined - Gribouillis - Nov-21-2018 If you're talking about a tkinter button, use Button() . That said, I don't think it accepts a 'test' keyword argument.
RE: button not defined - Larz60+ - Nov-21-2018 capital B for tkinter.Button and as pointed out by Gribouillis, it's text, not test |