From ffe776b8f964fd353234b04ebe5f74ee0dbc5fc4 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Mon, 25 Jun 2018 18:13:56 -0700 Subject: [PATCH] deploy-ng: Support pktutil.get_data() on Python 3 Python 2 should already work. --- direct/src/showutil/dist.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/direct/src/showutil/dist.py b/direct/src/showutil/dist.py index e4bb44448a..5e6e646875 100644 --- a/direct/src/showutil/dist.py +++ b/direct/src/showutil/dist.py @@ -128,7 +128,12 @@ def find_spec(fullname, path=None, target=None): spec.origin = sys.executable return spec +def get_data(path): + with open(path, 'rb') as fp: + return fp.read() + FrozenImporter.find_spec = find_spec +FrozenImporter.get_data = get_data # Set the TCL_LIBRARY directory to the location of the Tcl/Tk/Tix files. import os