lua-users home
lua-l archive

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

> You have to go through the Lua code and alter every
> printf, fprintf etc. to redirect the output to your buffer.

As lhf noticed, there are only two places to change: "print" and the
error handler. You can always set your own error handler. Moreover, you
can redefine function print to print somewhere else (notice that the hard
work of "print" is done by tostring, so it is very easy to redefine print).
So, you need only a few lines of code to redirect Lua output to a message
window or to a file, all through the official API.

-- Roberto