This doesn't work and says that there's no such file or directory
current_conecctions = subprocess.Popen("netstat -p udp",shell = False, stdout=subprocess.PIPE).stdout.read()
While netstat -p udp
works perfectly in the terminal.
This doesn't work and says that there's no such file or directory
current_conecctions = subprocess.Popen("netstat -p udp",shell = False, stdout=subprocess.PIPE).stdout.read()
While netstat -p udp
works perfectly in the terminal.
Try to use a list of parameters instead of a single string:
command = ["netstat", "-p", "udp"]
current_conecctions = subprocess.Popen(command, shell = False, stdout=subprocess.PIPE).stdout.read()