469,627 Members | 1,069 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,627 developers. It's quick & easy.

Help with Tkinter and stdin input event binding


I'm fairly used to working with Python but it's the first time I'm
trying to use Tkinter so I'm running into a problem.

I'm using three python scripts with Tkinter GUIs and a fourth script
that basically opens communication pipes with the three others. The idea
is that the fourth script works as a communication intermediary between
the others. The problem is that I can't make the Tkinter GUIs respond to
stdin events because the toplevel mainloop isn't under my control, I
have no idea how to do this.

Here's the main idea simplified.

Script 1 is a Tkinter GUI.
Script 2 uses os.forkpty() to get the child's pseudo-terminal descriptor.

Now if in Script 1 I use <print "Here I Am!"I can get that input in
Script 2 using simply the os.read() method on the pseudo-terminal
descriptor. The problem is that when I use os.write() on that
descriptor, there's no way I can get the input on Script 1 because I
have no control whatsoever of the program's main loop. Is there any way
around this, either by adding some sort of stdin input event binding or
something similar?

Thanks in advance
Sep 25 '06 #1
0 1099

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Rodrigo Benenson | last post: by
6 posts views Thread by Elaine Jackson | last post: by
8 posts views Thread by Harlin Seritt | last post: by
9 posts views Thread by Tuvas | last post: by
1 post views Thread by Tuvas | last post: by
2 posts views Thread by Kevin Walzer | last post: by
4 posts views Thread by Davy | last post: by
5 posts views Thread by jamitwidme | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.