Python Forum

Full Version: stdin input while copying from a process pipe
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i would like to get some ideas of what tools to do this. i want a script to launch a child process that will be producing lots of out, such as the paths of file it is operating on. the user only needs to see a file path occasionally, like perhaps ever 6 seconds or every 20 seconds. what i want to do is have the parent read the pipe from the child and at the same time read the stdin terminal for the user typing in changes to that time interval. so the user, seeing a path being output every 6 seconds might type in 20[CR] and the parent changes to now copying one line of child output every 20 seconds. any suggestions other than select/poll?