Interact with a python script running on a remote windows machine

Hello,
Is there any way to have a python script, located on a remote windows host, and run it from Ansible interacting (giving input) with it?

It depends on what you mean by “interacting”.

To just run the script while passing input args, you can use win_shell

- name: Run a python script
  ansible.windows.win_shell: python c:\foo\script.py arg1 arg2 arg3

See the docs for more examples, there are keywords to help pass in arguments, stdin, change the working dir, etc ansible.windows.win_shell module – Execute shell commands on target hosts — Ansible Community Documentation

Passing in args in response to prompts is more difficult. I dont think theres an ansible native way to do it (there is the expect module but that is not for windows). You could try to write a powershell script that uses wexpect to execute your python script, and then have ansible call the powershell script