lua-users home
lua-l archive

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


In Lua I can write
   io.stderr:write(msg)
and get the msg on the stderr output stream.
Therefore I conclude io.stderr is in the globally accessible space.

In an alternative, special output module I want to duplicate this behaviour. Although I have managed to get working:
    io.write(stderr, msg)
The equivalent of the above io.stderr:write(msg) does not know stderr: "attempt to index field 'stderr' (a nil value)"

I have in earnest sought in the documentations as well as in the sources, but could not find how to accomplish this. Is there someone who will enlighten me and point in the right direction?

Thanks in advance,
Hans van der Meer