[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Operating a separate terminal under Lua control
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 28 Feb 2017 16:52:41 +0200
I thought this would work:
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
> term = io.popen('xterm -e "lua"',"w")
> term:write"Some Lua input\n"
After the first line, the new terminal appears. Encouraging.
After the second line, nothing changes on the terminal,
I thought it would pass my Lua input to it and run it.
After the third line, MY terminal dies. Ctrl-C brings it back,
killing the other terminal.
What I want to do is to make the other terminal execute
some Lua commands, as if I had been typing them in
Am I trying the impossible or missing the obvious?