[Tutor] How to interact with the result of subprocess.call()

boB Stepp robertvstepp at gmail.com
Sun Dec 25 12:08:06 EST 2016


On Sun, Dec 25, 2016 at 3:08 AM, Alan Gauld via Tutor <tutor at python.org> wrote:
>
> On 25/12/16 01:58, boB Stepp wrote:
>
> > the stdin option of call()might be used to direct the desired
> > keystrokes to LO?  After looking at
>
> The problem is that keystrokes in a GUI are not read from
> stdin, they are read as events from the GUI event loop.
> So, if LO was a CLI tool (like vim or top, say) then you
> are right, you could pipe the keystrokes through stdin,
> but in a GUI those keystrokes would never be seen (or
> if seen do something very different to what is expected)

Then I see that I have a GCE (Gross Conceptual Error) floating around.
I thought that event loops are just intercepting the redirected stdin
from the keyboard.  This is not true?  If not, then how is this
working?

boB


More information about the Tutor mailing list