Python Forum
how to pass the interactive string to Popen subprocess - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: how to pass the interactive string to Popen subprocess (/thread-29762.html)



how to pass the interactive string to Popen subprocess - maiya - Sep-18-2020

Hi All,

How to pass the interactive string to Popen subprocess and also it should support both python 2 as well as python3 interpreters.

For example -

pass the string while opening Popen process, then shell asks for the interactive message like (Y/N). So I need to pass this string to the subprocess. Finally complete output should return.

Please help me to achieve on this. Thanks a lot.

Regards,
Maiya


RE: how to pass the interactive string to Popen subprocess - Larz60+ - Sep-18-2020

We are glad to help with code after you have made an effort.
We are not here to do it for you.
Please give it a go, and then ask specific question if you have trouble.