I have written a Python program that takes information from the user at the command line, and then saves this data in a PostgreSQL database.

Now I want to wrap a GUI around my program. I am just starting with wxPython and have completed a few tutorials, but still can't figure out how to get want I want.

Basically my program has the user inputting data, which is then assigned to variables in Python, then the data from the variables are posted into the database.

So I basically need to know how how to create a GUI that accepts input from users in text boxes, then when the user clicks a button, the data in those text boxes is assigned to variables in my Python code. I know how to create the text boxes, but I don't know how to assign data from those text boxes to variables. Would this be a particular type of EVENT? Or something else?

Also, if I want any Python code to be executed on a particular event, do I just need to type the code to be executed under the On...Event code in my program?

Recommended Answers

All 2 Replies

I don't have any specific answers, but I suggest you start here. Most of the things you need, are discussed in great detail in that thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.