lua-users home
lua-l archive

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


Hello Rici,

Monday, March 5, 2007, 5:21:22 AM, you wrote:

RL> -- I'd do this:
RL> io.stdin = io.open"input.txt"
RL> io.stdout = io.open("output.txt", "w")

RL> -- But you can also use io.input() and io.output(),
RL> -- with slightly different semantics

This  was  the first thing I tried. Unfortunately, it doesn't work for
me,  as I want/need all input/output redirected. While functions using
io.std*  will  have  indeed  these  streams redirected, those that use
directly std* from C runtime (like print and os.execute() given in the
example) will still output to the screen instead of file.

-- 
Theodor-Iulian Ciobanu
Virus Researcher

e-mail: tciobanu@bitdefender.com

-----------------------------------------
Trying to secure your every bit
-----------------------------------------