lua-users home
lua-l archive

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

Sergio Fadda <> wrote:
> Hi.
> I'm writing a standalone application (Win32... windowed) which integrates
> the LUA interpreter; the application uses LUA to export some features and I
> want to show console output in a separated window.

I once wrote a plugin for the JPSoft command processor where I ran into
this problem. See the following threads:

I learned that redirecting I/O in a clean and foolproof manner is
non-trivial. The solution I found for the plugin seems to work but it's
at best a kludge.

So if you want to show output in a *real* console window only (and not
redirect to a file), your best bet is probably to write a small wrapper
for the Win32 console IO functions and to redirect the print/error etc
functions such that they use this wrapper.

cheers  thomasl