Python Forum
python environment variables
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python environment variables
#1
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
Reply


Messages In This Thread
python environment variables - by riyengar - Jul-11-2018, 06:02 PM
RE: python environment variables - by micseydel - Jul-11-2018, 10:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I cannot create a virtual environment on visual studio code using python Willem_Aucamp316 2 2,820 Nov-27-2024, 02:20 PM
Last Post: menator01
  Installing python packages in a virtual environment Led_Zeppelin 1 1,589 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  Understanding venv; How do I ensure my python script uses the environment every time? Calab 1 4,537 May-10-2023, 02:13 PM
Last Post: Calab
  Python development environment standenman 3 3,318 May-04-2023, 07:24 PM
Last Post: snippsat
  Python Scripting Environment jpotter0 1 3,070 Nov-19-2022, 03:07 PM
Last Post: snippsat
  How do I link the virtual environment of that project to the 3.9.2 version of python? Bryant11 1 2,260 Feb-26-2022, 11:15 AM
Last Post: Larz60+
  VS Code debugger using wrong Python environment topfox 0 3,816 Jun-09-2021, 10:01 AM
Last Post: topfox
  Virtual environment and upgrading python 3.5 to 3.9 NeilUK 4 15,588 Jan-24-2021, 01:02 PM
Last Post: snippsat
  Installing keras in Python 2.7 environment ErnestTBass 3 6,700 Nov-01-2020, 08:36 PM
Last Post: jefsummers
  Python in Linux environment on RPI kendias 22 14,213 Sep-05-2020, 03:04 AM
Last Post: K_Research

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020