lua-users home
lua-l archive

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


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 ;)