Re: lua source as config file
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: lua source as config file
- From: George Petsagourakis <petsagouris@...>
- Date: Thu, 8 Feb 2007 11:39:23 +0000 (UTC)
function getconfig( file )
local f = assert( io.open( file ) )
local ret = "return {"
for line in f:lines() do
ret = ret..line..","
end
return dostring( ret.."}")
end
This is a bit tweaked.
I wish that there was a YAML lib for Lua ;)