![]() |
silly piping - 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: silly piping (/thread-781.html) |
silly piping - Skaperen - Nov-05-2016 i've been researching (reading docs, googling) about piping output from child processes. it seems everything is oriented around the way the communicate() function works, which is to collect all the output from the child process and return it to the caller after the output is finished (EOF). is this how most programmers work? RE: silly piping - nilamo - Nov-07-2016 It depends on what you need. If waiting for it to finish is what you want, then that works great. If you want to work with data while another process generates it, so both run at the same time, then using a pipe (a named pipe, not communicate()) is the way to do that. Unless you care about scaling, in which case the two processes might be on different machines, in which case communication is done over sockets, databases, or named pipes. Fun fact: you can create named pipes on a samba share. Samba is also one of the things you can use Microsoft Azure for, for free. Although a lot of internet providers block the smb protocol. |