Environment: Windows 7 64-bit, Python 2.7.3 32-bit, PyWin32-217
This is a weird one. If you run the attached script (you'll need to manually close the file chooser), you'll find that Python does not exit when the script is done.
However, if you remove win32ui from the list of imports, the script exits just fine.
Also, if the script consists solely of "import win32gui, win32ui", it exits cleanly.
I printed a list of threads and it's just the main thread in both cases.
Another user on Stack Overflow found that this problem is reproducible by creating and destroying a GTK Window instead of opening a file chooser like I did. See: http://stackoverflow.com/questions/10467225/why-script-doesnt-quit-when-win32ui-is-imported-and-gtk-quits