From 17bb6fb0364baf4b2c0de89dde5b812dcc15002e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 7 Sep 2012 03:55:22 +0200 Subject: [PATCH] use current python-ox api --- tools/geo/py/geo.py | 4 ++-- tools/unicode/unicode.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/geo/py/geo.py b/tools/geo/py/geo.py index d76ef25c..9a20add8 100644 --- a/tools/geo/py/geo.py +++ b/tools/geo/py/geo.py @@ -328,7 +328,7 @@ def parse_txt(): def read_url(url): print 'reading', url - return ox.cache.readUrl(url) if CACHE else ox.net.readUrl(url) + return ox.cache.read_url(url) if CACHE else ox.net.read_url(url) def read_wikipedia_url(id): url = 'http://en.wikipedia.org/wiki/' + encode_wikipedia_id(id) @@ -371,4 +371,4 @@ if __name__ == '__main__': get_imdb_languages() print json.dumps(LOGS, indent=4, sort_keys=True) - \ No newline at end of file + diff --git a/tools/unicode/unicode.py b/tools/unicode/unicode.py index 8b86084f..fc360791 100644 --- a/tools/unicode/unicode.py +++ b/tools/unicode/unicode.py @@ -90,7 +90,7 @@ units = [ 'wb' ] -txt = ox.cache.readUrlUnicode('http://unicode.org/Public/UNIDATA/NamesList.txt') +txt = ox.cache.read_url('http://unicode.org/Public/UNIDATA/NamesList.txt', unicode=True) lines = txt.split('\n') length = len(lines) chars = {} @@ -167,4 +167,4 @@ f.close() f = open('json/no_ascii.json', 'w') f.write(json.dumps(sorted(no_ascii), indent=4)) -f.close() \ No newline at end of file +f.close()