subprocess.run icon indicating copy to clipboard operation
subprocess.run copied to clipboard

chaining commands that generate large output is impractical

Open abg opened this issue 12 years ago • 1 comments

subprocess.run uses Popen.communicate() which buffers data in memory. So some tasks that might be desirable to run (e.g. mysqldump | gzip ) will use too much memory and fail for many cases. Ideally this would instead just link up pipes across processes and handle the file descriptor management behind the scenes, so it could handle arbitrary command chains.

abg avatar Oct 30 '13 18:10 abg

Thanks for the comment. You are totally right, it looks like I was super optimistic about https://github.com/xando/subprocess.run/blob/master/run/init.py#L146

Will try to improve this process.

xando avatar Nov 02 '13 09:11 xando