From 234491058fc5a59084b6054d640ecfc17d3d35c1 Mon Sep 17 00:00:00 2001 From: jeremyd2019 Date: Wed, 17 Jun 2020 19:35:29 -0700 Subject: [PATCH] pywxrc: fix embedded resources in python 2.7 and 3 It turns out that memoryview() was resulting in an empty file in python 2.7, whereas bytearray is working in both 2.7 and 3. --- wx/tools/pywxrc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wx/tools/pywxrc.py b/wx/tools/pywxrc.py index 32c1c8a6..649c0e7c 100644 --- a/wx/tools/pywxrc.py +++ b/wx/tools/pywxrc.py @@ -226,7 +226,7 @@ def __init_resources(): """ ADD_FILE_TO_MEMFS = """\ - wx.MemoryFSHandler.AddFile('XRC/%(memoryPath)s/%(filename)s', memoryview(%(filename)s)) + wx.MemoryFSHandler.AddFile('XRC/%(memoryPath)s/%(filename)s', bytearray(%(filename)s)) """ LOAD_RES_MEMFS = """\