[Tutor] open extra xterm?
Abel Daniel
abli@freemail.hu
Sun Jan 5 09:47:01 2003
On Sat, Jan 04, 2003 at 11:43:19PM -0600 Scott (syrinx@simplecom.net) wrote:
> So I need at least two windows. How do I open a second xterm for
> output, while I use my main one as a readline terminal? I'm assuming
> pipes or something like that, but could someone show me a small example
> of spawning an xterm and writing to it. Thank you.
Not fully in python, but should work:
1, open xterm, excecute:
mkfifo /tmp/pipe
cat /tmp/pipe
2, start python program, for example:
fo = open("/tmp/pipe","w")
while 1:
i=raw_input('>>')
fo.write(i + '\n')
fo.flush()
Abel Daniel
abli@freemail.hu