lua-users home
lua-l archive

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


Hi,

currently I am writing a standalone lua application. This application
needs a config file, which I want to implement as an hash
table...something like this:

profile={ SoC_a=( baudrate=115200,port="/dev/ttyS1"}}

and put into an additional file in $HOME or equivalent.

But how can I load it back into my application?

The explanation of loadfile() says, that the code will be compiled
and stored "for later execution". But my config file does not 
have anything to call or execute. 
How it becomes accessible from inside my application?

What is the best lua-ish way to accomplish the handling of 
config files, which are valid lua code?

Thank you very much in advance for any help!
Have a nice weekend and less rain ;)
Best regards,
mcc