Tuesday, August 7, 2018

setting environment variable in Python from bash wrapper

I am trying to run Python script through a wrapper script which sets path to different directories and handle log file & script execution.



While running shell scripts through this wrapper we assign the paths by using ${temp_data_path} in the ksh&bash scripts ,so now I want the same path but in my python script.



I am trying below,as I believe i have to set environment variable first by reading the value set for temp_data_path by my wrapper:



os.environ[temp_data_path] = ??not sure how I can assign the value from wrapper here

print os.environ[temp_data_path]

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...