Posts: 4,653
Threads: 1,496
Joined: Sep 2016
is subprocess.Popen the
best choice for
lively data reading? what i mean by
lively data reading is that i can read the data immediately after the kernel makes it available from the child process that was start in that call writes it out to the kernel, instead of waiting for the child process to exit/end and get all of the output all at one. think of reading the output of the ping command.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
what if you have a child process that periodically outputs to stderr amongst output to stout. can you monitor that, prefix each line with "e" or "o" depending on whether it was written to std
err or std
out, and write that somewhere just after it gets written by the child?
or, just deal with N child processes running concurrently?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
Jul-04-2018, 01:20 AM
(This post was last modified: Jul-04-2018, 01:21 AM by Skaperen.)
i want to put together a way to do it without threading. i want to be able to mix analyses of the data without the complexities of threading. i'm just trying figure out early whether it is better to start all these child processes with subprocess or with os. coming from C programming, using os will be familiar (fork, etc). but if subprocess can easily do it, that should be the way to go. i just want to know in studying subprocess will take lots of time for
this.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.