sending to an xterm

Derek Martin code at pizzashack.org
Fri Aug 8 16:58:21 EDT 2008


On Fri, Aug 08, 2008 at 08:25:19PM +0000, Kent Tenney wrote:
> Howdy,
> 
> I want to open an xterm, send it a command and have it execute it.

You can't do that.  xterm doesn't execute shell commands passed on
stdin...  It can, however, execute one passed on the command line.

Instead of just running xterm, you can run "xterm -e 'cmd foo bar'"
where cmd is the program to run and foo and bar are its arguments.
The problem is that as soon as the program exits, xterm will exit
also.

-- 
Derek D. Martin
http://www.pizzashack.org/
GPG Key ID: 0x81CFE75D

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20080808/f6b6f03f/attachment.sig>


More information about the Python-list mailing list