#
import re
-try:
- from cStringIO import BytesIO # Py3 mangled by 2to3 ...
-except ImportError:
- from cStringIO import StringIO as BytesIO # Py3 mangled by 2to3 ...
+from StringIO import StringIO
from Scanning import PyrexScanner, StringSourceDescriptor
from Symtab import BuiltinScope, ModuleScope
import Symtab
context = StringParseContext([], name)
scope = context.find_module(module_name, pos = initial_pos, need_pxd = 0)
- buf = BytesIO(code.encode(encoding))
+ buf = StringIO(code)
scanner = PyrexScanner(buf, code_source, source_encoding = encoding,
scope = scope, context = context, initial_pos = initial_pos)