lua-users home
lua-l archive

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

> not entirely convinced that the only reason you would ever want to use
> a "loadfilein" is sandboxing, but then in truth I don't have an actual
> counterexample to support that. Sorry for the noise, anyway.)

Again maybe I was not very clear. The specificity of the situation was
not only the sandboxing, but the absence of the io lib. With the io
lib, you should be able to do a loadfilein like here:

  loadin(env, io.lines(filename))

(except that this does not work, because 'io.lines' cut the newlines
from the file; we intend to fix that somehow...)

-- Roberto