I have a simple Tkinter program that has a button and an entry. Now, how do I run code from the entry?
For example:
Entry -> print 'Hello!'
Button -> Run the entry command
MaracKoMarac 0
Newbie Poster
Recommended Answers
Jump to PostSomething like this can do ...
s = 'print "Hello!"' exec(s)
All 2 Replies
Reply to this topic
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.