8

Screensavers in Windows are just regular executables being ran if idle for certain amount of time. They are the same ".exe" files, only with extension (renamed) ".scr". To use a ".scr" file as your screensaver, you right-click on it and choose "Install".

Python has a number of ways to get your Python script(s) to an .exe file. You can use existing tools like py2exe, write your own C++ exe which just triggers the main Python script, or use tools which convert .bat batch files to .exe executable files. I've tried my own C++ exe and few batch converters, but none give what I want. py2exe is limited for my use. My Python script always fails to run. If the console is visible, this is all that is shown:

C:\Windows\system32>python -i "main.py"

C:\Windows\system32>pause
Press any key to continue . . .

What can I do to turn my Python program into a true Windows screensaver?

BTW, I use the Panda3D engine for the screensaver visuals, if that matters.

  • I don't have the answer myself, but perhaps this other SO question will help: http://stackoverflow.com/questions/5165133/how-can-i-write-a-screen-saver-for-windows-in-c. – Ethan Furman Jul 02 '13 at 20:15

0 Answers0