def SaveWindowSize(section, rect, state=''):
 (left, top, right, bottom) = rect
 if state:
  state = (state + ' ')
 win32ui.WriteProfileVal(section, (state + 'left'), left)
 win32ui.WriteProfileVal(section, (state + 'top'), top)
 win32ui.WriteProfileVal(section, (state + 'right'), right)
 win32ui.WriteProfileVal(section, (state + 'bottom'), bottom)

def SaveWindowSize ( section , rect , state = '' ) : ( left , top , right , bottom ) = rect if state : state = ( state + ' ' ) win32ui . WriteProfileVal ( section , ( state + 'left' ) , left ) win32ui . WriteProfileVal ( section , ( state + 'top' ) , top ) win32ui . WriteProfileVal ( section , ( state + 'right' ) , right ) win32ui . WriteProfileVal ( section , ( state + 'bottom' ) , bottom )
writes a rectangle to an ini file args: section = section name in the applications ini file rect = a rectangle in a tuple .