Python Forum

Full Version: python environment variables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am trying to load environment variables defined in a config file for use in another python script. Examples I see are like loading the file and parsing variables, etc.

Want to mimic shell behaviour where I can define a config file and source it in another shell script.

Script is primarily used to connect to different databases.

Whole objective is to maintain these in one place to accommodate for any changes.

Appreciate your help.

Cheers.
Raj
Are you asking how to access environment variables with Python? Or something else?