For example, in bash:
python my_py.py
# i get some variable my_var
Back to bash. I want to have $my_var!
For example, in bash:
python my_py.py
# i get some variable my_var
Back to bash. I want to have $my_var!
You can write your variable and its value into an ini file from the python script.
In Values.ini file
my_var="value"
After executing python script, just invoke Values.ini using .
operator
. Values.ini
Now your shell variable $my_var
will be having the assigned value.
The advantage with this method is that you can assign any number of variables like this.
var1="value1"
var2="value2"
var3="value3"