[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Operating a separate terminal under Lua control
- From: Nagaev Boris <bnagaev@...>
- Date: Tue, 28 Feb 2017 16:09:20 +0000
On Tue, Feb 28, 2017 at 2:52 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> I thought this would work:
>
> $ lua
> 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"
> file (0x1ef95f0)
>> term:close()
>
> 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
> there.
>
> Am I trying the impossible or missing the obvious?
>
BTW I wrote a library to emulate terminal from Lua:
http://lua-users.org/lists/lua-l/2015-03/msg00325.html
--
Best regards,
Boris Nagaev