Could This Be Made Possible?

Would it be possible to do this to write data to a file:

  
io.output("myfile.txt")  
oprint(renoise.song())  
  

hat would be nice :)

print, oprint and rprint are stdout functions, they don’t seem to have a redirection option in Lua when i browse for answer upon those.
When searching on storing userdata objects, i only get answers that involve C# and CPP-code.

Hi,

I remember reading somewhere at http://lua-users.org that it is good practice to
have io be redirectable from lua, but I cannot find the post. Could be I am
misunderstanding something.

Anyway, this was just a “nice to have” thought.