I have a shell command which needs some user confirmation from stdin like below
support@vrni-platform:/tmp$ patronictl -c /etc/patroni/patroni.yml remove arkin
+---------+--------+------+------+-------+-----------+
| Cluster | Member | Host | Role | State | Lag in MB |
+---------+--------+------+------+-------+-----------+
+---------+--------+------+------+-------+-----------+
Please confirm the cluster name to remove: arkin
You are about to remove all information in DCS for arkin, please type: "Yes I am aware": Yes I am aware
The last two lines require user input.
Can someone let me know how can I automate the above using Python 2.7 which requires no user input?