I am new to python.I am not having any Knowledge of Python, i came across following line of python code
os.environ.get('IS_THIS_POSSIBLE', 'FALSE') == 'TRUE'
what does os.environ.get Do? Is it accessing something particular to OS internals.
I am new to python.I am not having any Knowledge of Python, i came across following line of python code
os.environ.get('IS_THIS_POSSIBLE', 'FALSE') == 'TRUE'
what does os.environ.get Do? Is it accessing something particular to OS internals.
Yes, it is getting operation system's environment variables. For your code, it's returning the value of os-environment variable 'ENABLE_BONDING_ROUTER', return 'FALSE' if it does not exist.
To set an environment variable see the following post on Super User: What are PATH and other environment variables, and how can I set or use them?
os.environ is a bunch of functions to read and write the system environment and os.environ.get() returns an environment variable. See this documnetation page for some details.