From 860d0e0a8926c11f74f0f0d9e988ce1ef3b3fa99 Mon Sep 17 00:00:00 2001 From: Mark Mine Date: Fri, 20 Jun 2003 00:12:46 +0000 Subject: [PATCH] File to squeeze showbaseglobals --- direct/src/showbase/pandaSqueezer.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 direct/src/showbase/pandaSqueezer.py diff --git a/direct/src/showbase/pandaSqueezer.py b/direct/src/showbase/pandaSqueezer.py new file mode 100644 index 0000000000..3efd946437 --- /dev/null +++ b/direct/src/showbase/pandaSqueezer.py @@ -0,0 +1,20 @@ +import os +import pandaSqueezeTool + +# Assumption: We will be squeezing the files from C:\Panda\lib\py + +def getSqueezeableFiles(): + directDir = os.getenv('DIRECT') + fileList = os.listdir(directDir + "\lib\py") + newFileList = [] + for i in fileList: + if i[-4:] == ".pyc": + j = directDir + "/lib/py/" + i + newFileList.append(j) + return newFileList + +def squeezePandaFiles(): + l = getSqueezeableFiles() + pandaSqueezeTool.squeeze("panda", "ShowBaseGlobal", l) + +squeezePandaFiles()