Lower-case INI file variables are OK in most circumstances.
For example adding this into the Touchy GUI init code (I just happened to have that one in the editor, not a special choice)
Code:
print("The value of [TEST]testywesty is %s" % self.ini.find("TEST", "testywesty"))
print("The value of [TEST]CAPITAL is %s" % self.ini.find("TEST", "CAPITAL"))
print("The value of [TEST]IDONTEXIST is %s" % self.ini.find("TEST", "IDONTEXIST"))
And inserting this in the corresponding INI file
Code:
[TEST]
testywesty = 12.3
CAPITAL = 4.56
Gives this result
Code:
The value of [TEST]testywesty is 12.3
The value of [TEST]CAPITAL is 4.56
The value of [TEST]IDONTEXIST is None
So lower case INI variables work in the general case.
But it seems that they do _not_ work in the case of G-code INI-file access.
This is probably because all G-code is lowercased before being sent to the interpreter. And then the bit of the interpreted that reads #<_ini....> variables explicitly uppercases them.
github.com/LinuxCNC/linuxcnc/blob/master..._namedparams.cc#L222
So, the actual situation is that if you want to read an INI variable from G code it must be capitalised, because case info is lost during the process of interpreting the G-code, and the interpeter assumes capitals.
To answer a question from the original posts, you can create a set of global parameters with particular values in the STARTUP_GCODES (would need to be a custom code or subroutine call, though).
But reading from the INI is probably best, accepting the limitations discussed here.