parameters: (win)
docstring: Centers the window.
docstring_summary: Centers the window.
docstring_tokens: Centers the window .
function: def center_window(win):
      """
      Centers the window.
      """
      win.update_idletasks()
      width = win.winfo_width()
      height = win.winfo_height()
      position_x = (win.winfo_screenwidth() // 2) - (width // 2)
      position_y = (win.winfo_screenheight() // 2) - (height // 2)
      win.geometry('{}x{}+{}+{}'.format(width, height, position_x, position_y))
function_tokens: def center_window ( win ) : win . update_idletasks ( ) width = win . winfo_width ( ) height = win . winfo_height ( ) position_x = ( win . winfo_screenwidth ( ) // 2 ) - ( width // 2 ) position_y = ( win . winfo_screenheight ( ) // 2 ) - ( height // 2 ) win . geometry ( '{}x{}+{}+{}' . format ( width , height , position_x , position_y ) )