Python Forum

Full Version: button not defined
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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? Wall

Thank you in advance.
If you're talking about a tkinter button, use Button(). That said, I don't think it accepts a 'test' keyword argument.
capital B for tkinter.Button
and as pointed out by Gribouillis, it's text, not test