ThirdParty/Pygments/pygments/util.py

branch
Py2 comp.
changeset 2669
11a6696ff868
parent 2525
8b507a9a2d40
child 3145
a9de05d4a22f
--- a/ThirdParty/Pygments/pygments/util.py	Sun Apr 21 20:30:56 2013 +0200
+++ b/ThirdParty/Pygments/pygments/util.py	Thu May 23 19:58:41 2013 +0200
@@ -10,6 +10,10 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
+try: 
+    chr = unichr
+except (NameError):
+    pass
 
 import re
 import sys
@@ -258,9 +262,9 @@
 if sys.version_info < (3,0):
     b = bytes = str
     u_prefix = 'u'
-    import io, io
-    BytesIO = io.StringIO
-    StringIO = io.StringIO
+    import StringIO, cStringIO
+    BytesIO = cStringIO.StringIO
+    StringIO = StringIO.StringIO
     uni_open = codecs.open
 else:
     import builtins

eric ide

mercurial