Skip to content

Commit 3eeccdb

Browse files
author
tjmather
committed
changes for 1.2.1 release
1 parent 20fe610 commit 3eeccdb

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ setup.py
55
test.py
66
test_org.py
77
test_city.py
8+
test_region.py

README

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ Usage:
1010
See test.py for example usage with GeoIP Country
1111
See test_org.py for example usage with GeoIP ISP and Organization
1212
See test_city.py for example usage with GeoIP City
13+
See test_region.py for example usage with GeoIP Region
1314

1415
License:
1516

16-
Copyright (c) 2003 MaxMind LLC
17+
Copyright (c) 2005 MaxMind LLC
1718

1819
All rights reserved. This package is free software; it is licensed
1920
under the GPL.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
include_dirs = ['/usr/local/include'])
88

99
setup (name = 'GeoIP-Python',
10-
version = '1.2.0',
10+
version = '1.2.1',
1111
description = 'This is a python wrapper to GeoIP',
1212
ext_modules = [module1])

test_region.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
gi = GeoIP.open("/usr/local/share/GeoIP/GeoIPRegion.dat",GeoIP.GEOIP_STANDARD)
66

77
gir = gi.region_by_name("www.google.com")
8+
if gir != None:
9+
print gir['country_code']
10+
print gir['region']
811

12+
gir = gi.region_by_addr("24.24.24.24")
913
if gir != None:
1014
print gir['country_code']
1115
print gir['region']

0 commit comments

Comments
 (0)