Brett Cannon added the comment: No, my work has the exact same problem. Actually, this bug report has confirmed for me why heapq could not be imported when I accidentally forced all open text files to use UTF-8. I just have not gotten around to trying to solve this issue yet. But since importlib just uses open() directly it has the same problems.
Since it looks like TextIOWrapper does not let one change the encoding after it has been set, some subclass might need to be written that reads Looks for the the stanza or else immediately stops and uses the expected encoding (UTF-8 in the case of Py3K or ASCII for 2.6). That or expose some C function that takes a file path or open file that returns a code object. But I have bigger fish to fry as my attempt to get around open() being defined in site.py is actually failing once I clobbered my .pyc files as codecs requires importing modules, even for ASCII encoding. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1278> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com