import zipfile
import urllib
import subprocess
+try:
+ from urllib.request import urlretrieve
+except ImportError:
+ from urllib import urlretrieve
URL = 'http://unicode.org/Public/cldr/23/core.zip'
def log(message, *args):
if args:
message = message % args
- print >> sys.stderr, message
+ sys.stderr.write(message + '\n')
def is_good_file(filename):
log('Downloading \'%s\'', FILENAME)
if os.path.isfile(zip_path):
os.remove(zip_path)
- urllib.urlretrieve(URL, zip_path, reporthook)
+ urlretrieve(URL, zip_path, reporthook)
changed = True
print
common_path = os.path.join(cldr_path, 'common')