user interface - How do I run my Python script using Tkinter? -


I'm trying to run my script when I press a button on my UI, it is not certain that How to get it done Any ideas? Example: tkinter import * root = from Tk () def OpenPro1 (): print ("hedge") button = = button (root, text = "hedge", command = openpiro 1) button_1. Pack () Root.mainloop ()

Instead of printing a text I want to run it a program!

Your text should be an account for Unicode characters:

  From the tickenator import * root = Tk () Def OpenPro1 (): Print ("hedge") button = = button (root, text = u'hized \ xe5 ', command = openpiro1) button_1. pack () root.mainloup ( )  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -