In Windows a screensaver is an exe program with the extension “.scr”. Any exe file you wish can be used as a screensaver as long as you rename the extension to “.scr”.
I’ve tried many programs, including one which runs a Panda3d Python script. Both my own basic exe launcher and py2exe/cx_Freeze (packp3d+pdeploy gave me enough other troubles to continue using them).
This is what I get: starts, the immediately closes with this message which tells pretty much nothing:
Sorry for the bad image but I had to wait a whole minute patiently and press print screen just in the right half-second before the console closed.
The stack trace and error message indicate a failure to read a .ptf file in your ParticleEffect.loadConfig() call. Probably you need to add the .ptf file in question to your p3d file explicitly.
Can’t you try to run the executable directly from the command line as an .exe, instead of renaming it to .scr and running it as a screen saver? That ought to reveal the same error, and it would be a lot easier to see the error message.
I’m not using a p3d file.
it runs perfectly when I run it myself.
Try hardcoding the path to the .ptf to make sure that the problem is not simply that the .scr is ran from a different working directory.
If that’s not the case, perhaps Windows imposes special filesystem access restrictions on screensaver files? Can you successfully use the Python open() call on this file?