lua-users home
lua-l archive

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

>You can just reassign _STDOUT...

>>Reassigning _STDOUT (or _STDIN or _STDERR) does nothing.
Reassigning _OUTPUT and _INPUT does.

Aha! That works if I use write().

Can I redirect output (ie. output from write()) into a memory buffer/Lua
function without altering the Lua source?

If this is not possible consistency would point to me being able to do this
with stdout? i.e. I can redirect stderr to one of my functions using _ALERT.