The problem is that I'm not able to fetch the variable I set in any way.
I used
for var in vars:
os.putenv(str(f"${var}"), local_config[var])
print(f"{var} has been set")
I've also tried to use os.environ[var] but the result is always empty. I've also tried to remove the $ character.
When I echo the variable in the shell I get nothing, but from inside the script I have both the variable and the value, which proves that the data is ok.
How can I have something like os.environ["LOL"] = "TEST" and have "TEST" back when I echo $LOL? Just to be clear, the shell is the same I run the script into.
Thanks for the help.
$when you callos.putenv(). That's the shell syntax for reading a variable, it's not part of the variable name.