Skip to content Skip to sidebar Skip to footer

How To Debug Code Run Using Popen In Pycharm

I am running a codebase I have inherited from someone else which makes extensive use of user input. For this reason I am running it using subprocess.Popen. Here is an example. The

Solution 1:

I have had a similar issue with python and docker logs. What solved was running python with the -u flag as described here. Perhaps try changing your Popen call to use python and then include the -u flag. e.g. Popen(["python", "-u", "example2.py"], stdout=PIPE, stdin=PIPE, stderr=STDOUT, encoding='utf-8')


Post a Comment for "How To Debug Code Run Using Popen In Pycharm"