To find the locally connected ip address use arp -a and save to file.
import os
os.system('arp -a > ipaddresses.tmp')
f = open('ipaddresses.tmp', 'r')
now that we have a file that lists all the ip address we need to extract them using regex since there is alot of other junk in there.
ip = f.findall( r'[0-9]+(?:\.[0-9]+){3}', s )
and now you have an array of ip address that you can ping for information.
hope that helped.