Adding GUI to application

Andrae Muys amuys at shortech.com.au
Wed Feb 20 20:00:40 EST 2002


mgash at trisystems.co.uk (Mark Gash) wrote in message news:<9120a667.0202200814.1bd679cb at posting.google.com>...
> I wish to amend the application so that (i) it runs as before, (ii)
> there is an icon in the taskbar, via which the application can be
> stopped.
> 
> As a newbie to programming, I am finding this task difficult, to say
> the least. The problem that I am having, is that by using the
> win32gui_taksbar.py from the win32/demos module, I can get the icon
> down in the taskbar - but as the diskchecking application 'goes to
> sleep' rather than completes/exits, the control is never returned to
> the win32gui_taskbar to await the next interupt.
> 
Mark,
   While I've never written anything with Win32 before (regardless of
language), I've written applications like this numerous times under
unix.  The standard solution I tend to use (which I in turn borrowed
off numerous other applications ;) is to store the process id in a
file/known location (maybe the registry? or is this a bad idea under
windows?) and to write a second program that reads the pid, and sends
the appropriate signal to the background process to terminate it
(under unix generally a SIGHUP [hangup signal]).  I believe under NT
daemons are called "services", there should be a programatic way of
terminating them from another process.  I don't know about windowsXXX.

Andrae Muys



More information about the Python-list mailing list