[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: config-file for a config-language: where the cat meet its tail ?!?
- From: meino.cramer@...
- Date: Sat, 14 Jul 2012 07:26:44 +0200
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