[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Stdout
- From: "Nick Trout" <nick@...>
- Date: Wed, 24 Jan 2001 10:31:11 -0000
> lua_dostring(state,"_STDOUT = tprint");
>>This doesn't work, because _STDOUT is a handle. You can't replace a handle
with a function and expect things to work. Like I said before, you have to
redefine print and write.
Right okay, I have been fiddling around with the code so I wasnt sure if I
had broken something in trying this. It would be nice if this functionality
My suggestion for adding lua_stdout and lua_stderr allows you to redefine
stdout and stderr at runtime if you dont have the advantage of being able to
redirect these streams. eg. in Windows. You may want to do this for example
if you use Lua to load some kind of debug library at runtime which catches
stderr. I realise I can edit the Lua code but it would be nice if this were
the default functionality.
>> Can I make myself clearer somehow?
I don't think we need the sarcasm but thanks for the advice.