Python Forum
where to find advanced level guides
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
where to find advanced level guides
#1
i am looking for advanced level guides to python for subprocess piping.

i want to be able to read data from a subprocess so this involves pipes where the child process write and the parent process reads.

the subprocess outputs one line at a time with important timing and runs forever, so methods like .communicate() which collect data until the end, are useless for two reasons.

i will have 2 or more processes with separate pipes and need to not be blocked trying to read one of the pipes when data becomes available on another.

i have done this in C before.


examples of code i have seen online while googling have been very long and complicated, more so than the C code i have done.  i can't tell if that example code achieves my needs.

does anyone here have an idea where i can find good examples of this ?

does anyone here even understand this kind of "non-block I/O" ?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
Have you looked at https://docs.python.org/3/library/multip...ssing.pool

In addition, David Beazley has a couple of great videos on the Gil herehttps://www.youtube.com/channel/UCbNpPBM...eJkkezog7Q
Reply
#3
that multiprocessing example creates its own process so it will be "over complicated" for me since i can't use the basis of that example.  my processes may be created by a variety of ways in other code.

i have not seen these videos and i don't have time to view them today and probably not tomorrow.  if you know where within the videos the pipe i/o talk is, letting me know could speed up my efforts.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#4
his short videos don't cover all topics or those of my interest

the rest of his videos are too long

youtube videos don't have a good way to find where topics of special interest are.

i'd pretty much have to be interested (and have the time for) whole videos.   but that could be possible with other aothors.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Sending Advanced Commands with Netmiko rogueakula 1 1,988 Oct-22-2019, 07:54 PM
Last Post: rogueakula

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020