Example Main.py for packp3d

Hello there, I’m quite new to Panda3d and I’m trying to deploy my first sort-of program (mainly just to see if I can). I’ve got a compiled C++ executable as well as any and all required models in a folder, but the Main.py file is giving me problems.

I know hardly anything about Python and I’ve tried to open the executable (subprocess.Popen(“myexe.exe”)) but I keep getting a ‘WindowsError: File not found’ or something to that ilk.

If anyone could show me how one would make a python wrapper to execute “myexe.exe” when you run “panda3d myp3d.p3d” it would be greatly appreciated.

There are several issues still outstanding with regards to deploying a C++ application with packp3d.

We do expect to have these issues resolved with a future release of Panda, but in the meantime, you will probably be better off simply compiling your executable and distributing it via more traditional means, such as with an NSIS installer.


Thanks, I thought that since the manual said I needed a “trivial amount of python code” it wouldn’t be all that difficult.

Is there a list of DLLs I need to include in the package or is that a trail-and-error thing?

It depends on which systems you are using. Unless you go out of your way to reduce the systems, though, it’s probably all of them. :slight_smile: