~jamesh/geoip-python/devel

« back to all changes in this revision

Viewing changes to test_org.py

  • Committer: tjmather
  • Date: 2003-03-18 18:39:08 UTC
  • Revision ID: vcs-imports@canonical.com-20030318183908-mm4zexhbb5mvbq3p
initial checkin

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
import GeoIP
 
4
 
 
5
gi = GeoIP.open("/usr/local/share/GeoIP/GeoIPOrg.dat",GeoIP.GEOIP_STANDARD)
 
6
 
 
7
print gi.org_by_name("yahoo.com")
 
8
print gi.org_by_name("www.government.de")
 
9
print gi.org_by_addr("203.195.93.0")