0

I use wx.Yield to send the ping results to our text control in real time. But I get just the results until ping had finished running.

def pingIP(self, ip):
    proc = subprocess.Popen("ping %s" % ip, shell=True, 
                            stdout=subprocess.PIPE) 
    print
    while True:
        line = proc.stdout.readline()                        
        wx.Yield()
        if line.strip() == "":
            pass
        else:
            print line.strip()
        if not line: break
    proc.wait()

I want to Print out multitask PING, TRACERT in WxPython same time Any advise? Thanks

Phatnv
  • 1
  • What is the problem you have and what command are you trying to issue. You appear to have included in your question, just the part you do have working, rather than the actual problem. What is the value of `ip` – Rolf of Saxony Nov 07 '22 at 19:04
  • Tks for reply. IP is list ip address when I want to input. I mean to redirect Windows cmd output ping many IPs on GUI LIVE time – Phatnv Nov 08 '22 at 11:24

0 Answers0