lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, May 29, 2013 at 9:45 PM, Eduardo Ochs <eduardoochs@gmail.com> wrote:
and run "lua foo.lua" then I can interact with it; but if I omit the
first `io.stdout:setvbuf("no")' then it gets stuck in the same way as
the Lua interpreter...

Basically, if you want to capture the Lua process interactively, you need to switch off buffering on stdout.

So in the SciTE that comes with LfW, the invocation for Lua is:

lua -e "io.stdout:setvbuf 'no'" "$(FileNameExt)"

Here it's done to keep stderr/stdout in sync, but this trick works fine for interactive use.