summary refs log tree commit diff stats
path: root/lib/pure/unidecode/gen.py
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-08-30 15:33:34 +0200
committerAraq <rumpf_a@web.de>2018-08-30 15:33:34 +0200
commita14ffd61192ccc77623c741bc859a2a67a0673f4 (patch)
treeec2d3016c5f152b69989376cca6aaa29851ee8c5 /lib/pure/unidecode/gen.py
parent3e6b58323bb1c33bfa6d1a70905ee10e4f20f638 (diff)
downloadNim-a14ffd61192ccc77623c741bc859a2a67a0673f4.tar.gz
fixes #8768
Diffstat (limited to 'lib/pure/unidecode/gen.py')
-rw-r--r--lib/pure/unidecode/gen.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/pure/unidecode/gen.py b/lib/pure/unidecode/gen.py
index 8da0136ff..33f1c799f 100644
--- a/lib/pure/unidecode/gen.py
+++ b/lib/pure/unidecode/gen.py
@@ -5,22 +5,22 @@
 # (c) 2010 Andreas Rumpf
 
 from unidecode import unidecode
+import warnings
 
-def main2(): 
+warnings.simplefilter("ignore")
+
+def main2():
   data = []
-  for x in xrange(128, 0xffff + 1):
-    u = eval("u'\u%04x'" % x)
-    
+  for x in range(128, 0xffff + 1):
+    u = eval("u'\\u%04x'" % x)
+
     val = unidecode(u)
     data.append(val)
-    
-    
-  f = open("unidecode.dat", "wb+") 
+
+  f = open("unidecode.dat", "w+")
   for d in data:
     f.write("%s\n" % d)
   f.close()
 
 
 main2()
-
-