def window_by_index(idx):
 if (not window_registry):
  raise NoWindow()
 else:
  key = sorted(window_registry)[idx]
  return window_registry[key]

def window_by_index ( idx ) : if ( not window_registry ) : raise NoWindow ( ) else : key = sorted ( window_registry ) [ idx ] return window_registry [ key ]
get the nth opened window object .