win.iconify()

w.iconify()
Replaces a window by a small icon and puts this icon along the other icons in the lower left corner of the screen. Equivalent to clicking the rightmost button on the window's titlebar. Moving the mouse over the icon will pop up the title of the window, and clicking the icon (or calling the "deIconify()" method) will restore the original window. When an iconified window calls its submit window, the icon will turn red until all server requests have returned.