lua-users home
lua-l archive

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


> The manual says (sect 6.4) you can redirect _OUTPUT into a given file using
> writeto(filename). Errors, or stderr, can be caught by redefining the
> _ALERT() function. It would be nice to be able to redirect stdout as you can
> stderr (using _ALERT) something like _WRITE(text). I dont think you can do
> that? (Sorry I'm still a learner) You actually have to alter Lua code to do
> this. So with a standard installation of Lua I could do:

You can just reassign _STDOUT...

> Maybe I just need to get into more of a Lua mindset?!! :-)

Quite possibly. I've found over and over again that things I can't see how
to do without changing Lua are in fact trivial.

-- 
http://sc3d.org/rrt/
"In 1727, Helen Morrison, a lonely spinster, became the first woman to
place a Lonely Hearts advertisement. It appeared in the Manchester Weekly
Journal. The mayor promptly committed her to a lunatic asylum for four
weeks." - The People's Almanac #2