File: test_org.py

package info (click to toggle)
python-geoip 1.2.1-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 108 kB
  • ctags: 43
  • sloc: ansic: 262; python: 45; makefile: 3
file content (9 lines) | stat: -rwxr-xr-x 223 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
#!/usr/bin/python

import GeoIP

gi = GeoIP.open("/usr/local/share/GeoIP/GeoIPOrg.dat",GeoIP.GEOIP_STANDARD)

print gi.org_by_name("yahoo.com")
print gi.org_by_name("www.government.de")
print gi.org_by_addr("203.195.93.0")