Re: Obtain the variable in bash.

2016-03-23 Thread Chris Angelico
On Wed, Mar 23, 2016 at 7:35 PM, Hongyi Zhao wrote: >> My guess is that you started the IDEs from your GUI in some way (the >> Applications menu or something). If that's the case, they'll inherit >> their environment from your GUI. You _may_ be able to have them "notice" >> your change to .bashrc

Re: Obtain the variable in bash.

2016-03-23 Thread Hongyi Zhao
On Wed, 23 Mar 2016 18:19:04 +1100, Chris Angelico wrote: > Did you start pycharm/wing from the same session in which you sourced > .bashrc? If not, they won't see that change. Thanks a lot for this explanations. It does behaves as you said which I previously not noticed. > > My guess is tha

Re: Obtain the variable in bash.

2016-03-23 Thread Ben Finney
Hongyi Zhao writes: > I exported a variable in my .bashrc as follows: > > export MY_VAR="fdsfads" That ‘export’ means that child processes of this one (i.e., the shell in which that command executed) will inherit that variable in their environment. Processes that are not children of this one, w

Re: Obtain the variable in bash.

2016-03-23 Thread Chris Angelico
On Wed, Mar 23, 2016 at 6:12 PM, Hongyi Zhao wrote: > I exported a variable in my .bashrc as follows: > > export MY_VAR="fdsfads" > > Then I soured the .bashrc and do the testing as follows: > > werner@debian-01:~$ python -c "import os; print os.environ['MY_VAR']" > fdsfads > > But, when I run the