0

I am still new to python and I have a question about python and Tkinter.I already find the answer about it but i dont understand. How to display the subprocess output in a Tkinter GUI? I only manage to display it in the terminal, but I want to display in a GUI, please help me for my Final Year Project. Please edit my coding, MASTER

import Tkinter
import subprocess


top = Tkinter.Tk()


def helloCallBack():

   print "Below is the output"
   subprocess.call('cat /etc/os-release', shell=True)


B = Tkinter.Button(top, text ="Example", command = helloCallBack)

B.pack()
top.mainloop()

0 Answers0