RSSAmplifier

Pete Zaitcev · Oct 29, 2023

Python subprocess and stderr

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

Suppose you want to create a pipeline with the subprocess and you want to capture the stderr. A colleague of mine upstream wrote this : p1 = subprocess.Popen(cmd1, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) p2 = subprocess.Popen(cmd2, stdin=p1.stdout, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) p1.stdout.close() p1_stderr = p1.communicate() p2_stderr =…

Read on zaitcev.livejournal.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.