Hello! I’m new to Forum and Panda3D.
I’m creating a script to use the multifile module; it’s ready but when I tried to compile it with py2exe, it didnt work! -> problems with the DLLs
so, I tried to import the DLL by myself. The script is:
import os
from libpandaexpressModules import *
global mf
global vfs
mf = Multifile()
vfs = VirtualFileSystem.getGlobalPtr()
#print dir(mf)
def Open(file,passw=None):
mf.openReadWrite(file)
if passw != None:
mf.setEncryptionFlag(True)
mf.setEncryptionPassword(passw)
def ReadSubFile(file):
index = mf.findSubfile(file)
if index == -1: return
return mf.readSubfile(index)
def AddSubFile(fname,compress=9): #not working
mf.update_subfile(fname, Filename.binaryFilename(fname),9)
mf.flush()
def SubFile_Exists(sf):
return (mf.findSubfile(sf) != -1)
def Get_SubFiles():
return mf.getSubfileNames()
def Get_SubFiles_ext():
sf = []
sft = []
for i in range(mf.getNumSubfiles()):
sft.append(str(mf.getSubfileName(i)))
sft.append(str(mf.getSubfileLength(i))+" Bytes")
sf.append(sft)
sft = [] #clear
return sf
def Get_SubFileID(name):
n = mf.findSubfile(name)
return n
def ExtractSubFile(sid,path):
a = open(path,"wb")
print "extracting",sid,"ID:",Get_SubFileID(sid)
fdata = ReadSubFile(sid)
a.write(fdata)
a.close()
if __name__ == "__main__":
Open("test.mf")
and i get:
Traceback (most recent call last):
File “C:\Panda3D-1.7.2\samples\mfPPack\mfzip.py”, line 3, in
from libpandaexpressModules import *
File “C:\Panda3D-1.7.2\samples\mfPPack\libpandaexpressModules.py”, line 1, in
from extension_native_helpers import *
File “C:\Panda3D-1.7.2\samples\mfPPack\extension_native_helpers.py”, line 82, in
Dtool_PreloadDLL(“libpandaexpress”)
File “C:\Panda3D-1.7.2\samples\mfPPack\extension_native_helpers.py”, line 80, in Dtool_PreloadDLL
imp.load_dynamic(module, pathname)
ImportError: DLL load failed: Não foi possível encontrar o procedimento especificado.
note that I copied the libpandaexpress.dll, libpandaexpressModules.py and extension_native_helpers.py to this directory (C:\Panda3D-1.7.2\samples\mfPPack)
How can I get rid of this error?
Thanks in advance!
Loblão