I created an complete logger-type program, that logs the certain data from the internet sources. It's GUI I coded in wx.python
, now I want to daemonize it (if it is the right term). The program needs to run in background and user has to have option to call/open GUI when he pleases. How can I achieve this with wx.python?
Asked
Active
Viewed 315 times
1

Domagoj
- 1,674
- 2
- 16
- 27
1 Answers
3
I wouldn't really "daemonize" it per se. Instead, I would just put it in the system tray...at least, that's what I would do on Windows. I assume you can do something similar on the other OSes. Basically you want to bind the frame to wx.EVT_ICONIZE and in that method, you hide it. Then when the user double-clicks the taskbar icon, you want to show it and probably Raise it too.
There's some badly formatted code here: http://bytes.com/topic/python/answers/699757-wxpython-how-minimize-taskbar (I've used a variation of it myself, so I know it works).
And here's some information on Task bar icons: http://www.blog.pythonlibrary.org/2011/12/13/wxpython-101-creating-taskbar-icons/

Mike Driscoll
- 32,629
- 8
- 45
- 88
-
Thank you for guidelines this was exactly what I really needed! Can you explain me then what is the difference from daemonizing and putting the program int system tray? I thought it is the same :S. – Domagoj Apr 24 '13 at 17:36
-
1It's pretty subtle. A daemonized script is something that runs in the background like a service. I don't think most of them have an interface at all. Look at the many services and programs that are running in Task Manager, for example. An app that has a way to bring up a screen is to me, a hidden app. I hope that makes sense. http://en.wikipedia.org/wiki/Daemon_%28computing%29 - a program that doesn't allow the user to have direct access to it – Mike Driscoll Apr 24 '13 at 18:10