mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Use textfile_open when loading core.pi to avoid encoding errors in Python3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -812,8 +812,8 @@ def myExecfile(filename, ns):
|
||||
|
||||
def textfile_open(filename, mode='rt'):
|
||||
"""
|
||||
Simple wrapper around open() that will use codecs.open on Python 2.x and
|
||||
on Python 2.3 will add the encoding parameter to the normal open(). The
|
||||
Simple wrapper around open() that will use codecs.open on Python2 and
|
||||
on Python3 will add the encoding parameter to the normal open(). The
|
||||
mode parameter must include the 't' to put the stream into text mode.
|
||||
"""
|
||||
assert 't' in mode
|
||||
|
||||
Reference in New Issue
Block a user