How do I start a Python screensaver that takes keyboard input in Ubuntu (and preferably Windows)? -


I am developing a small application for home use in Python. It is supposed to work as a slideshow screensaver, but it also acts as a primitive image manager. I have covered slideshow and image manager aspects (I'm using Tuscan), but I have not applied the screensaver bit yet. Therefore, starting the app from the command line works fine.

I Ubuntu'm gone and I keyboard input is required to apply to be accepted able to I do not think I Aksskriansvr / Gnom-screensaver framework because it captures everything and instead Login Displays the dialog. I would love to prove it wrong here (and after so many years it would be good to return to Xscreativeware :)).

The solution I have to use is to find out when the user is inactive and manage the screensaver bit manually but it will be ideal for finding another solution for another platform, because I I want to share this program with some Windows-friends.

On my questions, then:

  1. Can I use Aksskriansver to start your program, but avoid dealing with Aksskriansr Keyboard for?

  2. Is PXSSS platform-independent option?

  3. How can I go about getting the same functionality in Windows? For

Though a notion: I think That is, instead of regular group (= dependency) of files, It would be best to make an executable.

I use this setup configuration ( py2exe ) to make a single executable:

  distutils.core import setup includes import import py2exe = [] does not include [ '_gtkagg', '_tkagg', 'bsddb', 'curses',' email ',' pywin. debugger ',' pywin.debugger.dbgcon ',' pywin.dialogs ',' tcl ',' Tkconstants ',' Tkinter ',' MSVCP90.dll '] packages = [] dll_excludes = [' libgdk-win32-2.0-0 .dll ',' libgobject-2.0-0.dll ',' tcl84.dll ',' tk84 "Dll_excludes": "dll_excludes": dll_excludes, "dll_excludes", "exclude" "Bndl_failen": 1, "Dist_dir": " Dist ", "Aksref": false, "Skip_arekwaiv": false, "Assy" Fa Lse, "custom_boot_script": '',}}, zipfile = none, windows = [ 'main.py'] # & lt; - Your code file name)  

Edit: To compile it, you will need the MSVCP90.dll file in the same folder. If you can not find it on your PC, then use Google only to find it!

Commandline operator: Many command line operators have been assigned previews, settings, etc.) You will have a list here:

Unfortunately what has been written That's not all right, so in a nutshell:

  • / s and / s ... when the screensaver starts (in the preview One of them)
  • / c: # ... when the configure-button is pressed if first sysargv [1] [: 2] == '/ c': < / Code> works well for example
  • / P # ... is often called (when you turn off the configuration, or after the preview ... etc), this is normal screensaver Comes back to settings I leave it with any other possibilities (except / s / S / / c: #) works fine!

User Input: It is really easy to handle keyboard strokes, because it will not automatically leave mouse-over or keyboard events, but you can use these methods Apply yourself! Do not forget to write your "on_mouse_event_close_program" function!


Comments