entropyreduction wrote:
> I use the standard win32 API functions to get and retrieve ini values;
> that sounds very much like what they would do. They're not widly
> intelligent.
Standard Win API removes a single " or ' pair around a string - not
inside, just around - not a single one, it needs to be a pair.
> -- check out vars plugin. Use it to save/restore single
> variables when you need them.
I highly recommend it. I've been using it for a couple of years now and
find it indispensable. Creating a persistent data record for any script
is as easy as:
1. declaring static or global the variables that you want the record to save
2. vars. save(...)
and run your script
then when the you run the script again:
3. vars.restore(...)
If you want to include just some variables as part of your profile:
4. vars.save_var("varname",...) paired with vars.restore_var(...)
If you want to create sections like an .ini file, that is different
snapshots of the same data structure:
5 vars.save(..., "section_name",...)
The vars plugin creates text files that one can easily edit. It saves all
kinds of characters including multiline strings as in "a\n\b\c". It
reads/writes complex datatypes such as maps and vectors - you don't have
to do anything, just name the map or the vector.
Alan included a fancy system to help initialize new records, but
I never find myself using it. I prefer to just save the variable then
edit the saved file.
It doesn't do local variables, just static and global.
It's bug free, of course :-)
Thanks Alan for this plugin
-- sgp
P.S. shame on me for this unbiased review :-))