View Single Post
Old 11-17-2009, 10:39 PM   #126
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by Iņigo View Post
Btw, a Lua question:
I have some options in the file "program.ini" (f.e. "OPTION1 = true\nOPTION2 = false ..."). Is there a simple way to read this file using "loadfile" or similar and get a table with those options without parsing the file line by line
=> opts = { OPTIONS1 = true, OPTIONS2 = false, ... }, opts been a table defined in _G from the calling code?

Iņigo
Glib privodes a "Key-value file parser". See here: http://library.gnome.org/devel/glib/...le-parser.html
ericshliao is offline   Reply With Quote