code: def app_activate(caption):
      
      try:
          shell = win32com.client.Dispatch("WScript.Shell")
          shell.AppActivate(caption)
      except Exception as ex:
          print('error calling win32com.client.Dispatch (AppActivate)')
docs: use shell to bring the application with caption to front