All Questions
7 questions
0
votes
1
answer
297
views
Set environment variables in a python script and use them in a chained call [duplicate]
I would like to set a couple of environment variables in a Python script, then use said environment variables in a chained call.
For example, a python script called set_env.py:
os.environ["MY_VAR&...
1
vote
1
answer
7k
views
Run a Bash Script from Python and import the exported environment variables into Python
I have the following Bash script called Test_Vars.sh
#!/bin/bash
#----------------------------------------------------#
# Environment Variables being used in the process #
#------------------------...
0
votes
1
answer
231
views
Update Xterm Title Bar with Conda environment prefix
I wanted to update my gnome terminal tabs to indicate the conda environment that was active in that terminal. I typically have many tabs and a few environments activate at once, so finding the right ...
0
votes
0
answers
3k
views
Get environment variable from python script
I have bash script config.sh in which several variables are exported , and I need those variable in my python script.
config.sh
export VAR="YES"
My approach is to source the config.sh from the ...
0
votes
2
answers
590
views
environment variables script
There's several centos linux boxes at my workplace.
I've been tasked with creating some form of environment variable tool for them.
The idea is the user runs the tool, with the argument of their ...
8
votes
1
answer
33k
views
Set persistent environment variable for all users
I am running Ubuntu on a local PC with the following linux distro/kernel:
$ lsb_release -a
>> ubuntu 16.04.3 LTS
$ uname -r
>> 4.10.0-33-generic
I have a python (3.5) script which calls ...
2
votes
2
answers
3k
views
Avoid passing environment variable to python script
I have a small python script
#!/usr/bin/env python3
import some_python3_module
def main():
# do stuff
if __name__ == '__main__':
main()
and cannot run this script with Python3, since ROS ...