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.
This commit is contained in:
jeremyd2019
2020-06-17 19:35:29 -07:00
committed by GitHub
parent 0b84247e5a
commit 234491058f

View File

@@ -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 = """\