I am trying to run an ARP-scan on my raspberry Pi from a Python script.
I have tried the following code using the subprocess library, however when I attempt to print output I receive the error that there is no such variable
p = subprocess.Popen(" sudo arp-scan -l", stdout=subprocess.PIPE, shell=True) (output, err) = p.communicate() status = p.wait() print(output) print(err)
Is anyone able to tell me what I am doing wrong?
Many thanks in advance