I am writing a class to do some tasks with shell utility (tshark) using subprocess popen
My problem is that i am stacked actually don't have idea how to interact with method i created that running the popen and for example kill or terminate it , shown in code below.
So if someone could assist me or have another idea will be great
- Code: Select all
if OPS_WR == None:
tsharkCall = ["tshark","-i" ,NIC_LISTEN, "-w" + FL_TRNAME]
tsharkProc = subprocess.Popen(tsharkCall,executable="C:/Program Files/Wireshark/tshark.exe")