You can have an app with no windows. I did it recently. Here is a code
fragment that will display an icon in the taskbar and wait on left dblclick or
right click on it. No windows required...
You'll need an icon to test it, just you py.ico from the python directory.
from wxPython.wx import *
myicon = wxIcon('icons/mail3.ico', wxBITMAP_TYPE_ICO)
class App(wxApp):
def OnInit(self):
# setup a taskbar icon, and catch some events from it
self.tbicon = wxTaskBarIcon()
self.tbicon.SetIcon(myicon, "MailCall")
EVT_TASKBAR_LEFT_DCLICK(self.tbicon, self.OnTaskBarLeft)
EVT_TASKBAR_RIGHT_UP(self.tbicon, self.OnTaskBarRight)
return true
def OnTaskBarLeft(self, event):
print 'left'
def OnTaskBarRight(self, event):
print 'right'
if __name__ == '__main__':
app = App(0)
app.MainLoop()