mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Some Py3 fixes for PyCrust
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@76040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -816,10 +816,8 @@ def myExecfile(filename, ns):
|
||||
if sys.version_info < (3,):
|
||||
execfile(filename, ns)
|
||||
else:
|
||||
f = open(filename, 'r')
|
||||
source = f.read()
|
||||
f.close()
|
||||
exec(source, ns)
|
||||
with open(filename, 'r') as f:
|
||||
exec(f.read(), ns)
|
||||
|
||||
|
||||
def textfile_open(filename, mode='rt'):
|
||||
|
||||
Reference in New Issue
Block a user