Do anyone knows how to let ping to print in the tkinter GUI, not on the terminal
i had tried many methods and find on the net just couldn't find a method to solve it.
Many resource mention on subprocess or thread related methods.
Could anyone help me, please?
Thanks and really appreciate.
i had tried many methods and find on the net just couldn't find a method to solve it.
Many resource mention on subprocess or thread related methods.
Could anyone help me, please?
Thanks and really appreciate.
import sys import os from tkinter import * def ping(): myinptext = entry.get() os.system("ping "+entry.get()+" -n 2" ) myGui = Tk() entry = StringVar() myGui.geometry('300x300') myGui.title("Get output inside GUI") mylabel = Label(myGui,text="Enter target IP or host as required.").pack() mybutton = Button(myGui,text ="Ping Test",command = ping).pack() myEntry = Entry(myGui,textvariable=entry) myEntry.insert(-1,"8.8.8.8") myEntry.pack() myGui.mainloop()