Well, there are 2 things wrong at first glance.
One is an issue with the ConfigManager that we are still working on a fix for. That issue is that when the cfg file is executed, it currently takes 1 tick to get the value if it was changed in the cfg file.
The issue with your code is that you are printing out the config.cvar.CvarManager instance (which is a dictionary). If you want to get the value of the variable, you need to use the convar's get_<type> method:
Syntax: Select all
from config.manager import ConfigManager
from hello.info import info
def load():
with ConfigManager(info.basename) as config:
var1 = config.cvar('am_var1', 'test_val', 0, 'VAR1')
print('VAR1: %s' % var1.get_string())
Again, though, currently that will always be the original value you set it to (test_val) on first load. We will work to fix this so that that isn't the case.