Hello,
I'm looking to automate ping in packet tracer with Python. I made a script that works on PC Windows but not in PT. Error msg: AttributeError: '<invalid type>' object has no attribute 'system' in file Ping-PY.py on line 4
here is my script:
import os
def myping(host):
response = os.system("ping" + host)
if response == 0:
return True
else:
return False
print(myping("127.0.0.1"))
print("192.168.1.153")
print("192.168.3.50")
print(myping("192.168.4.115")
print("192.168.5.83")
print("192.168.5.227")
print("192.168.2.48")
print("192.168.2.67")
print(myping("192.168.5.252")
print("203.0.113.27")
I tried other scripts but without success! Is there a doc on how to use Python in Packet Tracer?
Thank you in advance