> I will write this up as a recipe in the Python Cookbook; any comments
> on my code (attached)?
The 'busy loop' looks ugly to my eyes. It can be solved by importing
win32gui, then changing the Quit method to:
def Quit(self):
win32gui.PostQuitMessage(0)
and the entire busy loop gets replaced with:
pythoncom.PumpMessages()
That obviously breaks the 'loops' variable though.
I also changed the if __name__ block to:
if __name__ == '__main__':
register()
main()
unregister()
That way, running it as a script "does the right thing" in a single step.
Cheers,
Mark
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32