Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #105526

Re: Obtain the variable in bash.

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: Obtain the variable in bash.
Date Wed, 23 Mar 2016 19:45:08 +1100
Lines 16
Message-ID <mailman.39.1458722711.2244.python-list@python.org> (permalink)
References <nctfkg$kt7$1@aspen.stu.neva.ru> <mailman.32.1458717548.2244.python-list@python.org> <nctkgu$p7s$1@aspen.stu.neva.ru>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de wkikxjcIinJXcb26o1GF1whUJ9x9YBj4slbdCI//s0hw==
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'received:209.85.223': 0.03; 'cc:addr:python-list': 0.09; 'wed,': 0.15; 'file,': 0.15; '2016': 0.16; '23,': 0.16; '7:35': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'ides': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:variable': 0.16; 'wrote:': 0.16; 'gui': 0.18; 'shell': 0.18; 'solution.': 0.18; 'variable': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; '(the': 0.22; 'recognize': 0.22; '(or': 0.23; 'tried': 0.24; 'header:In-Reply- To:1': 0.24; 'logging': 0.27; 'message-id:@mail.gmail.com': 0.27; "they'll": 0.29; 'thinks': 0.29; 'environment': 0.29; 'guess': 0.31; 'case,': 0.34; 'received:google.com': 0.35; 'sometimes': 0.35; 'but': 0.36; 'instead': 0.36; 'received:209.85': 0.36; 'depends': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'subject:the': 0.39; 'some': 0.40; 'your': 0.60; 'it!': 0.64; 'mar': 0.65; 'inherit': 0.66; 'chrisa': 0.84; 'processed,': 0.84; 'to:none': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=kSc5/0jnnXQpKmsBZyZ5hYEr8hpO8H0kUXjK+Q2uZmQ=; b=kknZ1b4/h09jB6MUXRuZ/t1balvWh67JUjF3FkS+Bpc0b1d6TNEOd1WfuphxUtg7/e 7YPwBIFM1424oeMHGBsIZhKPCPPcVi4Oerlj+FNy+wG3AGxZ6tUq4Q5lXCoxksst/rf+ dWrXyOfmHIWVgfc7tyu8UWdtqjx5V+hEBcKAGdw0qY1XwuNAb/v4Mh4p1GnvT0IFpf9v y3f8tUQE6yl0ksbGmoRhCfARV57PZgU8iy1PsSuxui8FvESmWLjLndAZqlQAPMaPmih7 36FQwKlYfX93Td2PTkMzNDelMSEuFY9W7+wLgHRYq23CQ9/fDw0xlMcFVo4VwWwvYStO um7A==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=kSc5/0jnnXQpKmsBZyZ5hYEr8hpO8H0kUXjK+Q2uZmQ=; b=Iy5ULoMKk2EkCGAmU+TRNtXbFuY9KpJVpKmf0yyTNWgA7swbblQZgPSFnAKKlQtIGK N/wU3+/I3hPxj6JR4IyHwkbgPedfuM0f2ufg9/hNBRYchS9q6v8rdRfeOQ3gmRqeIeuE a54Ava3Uw8ZTE0lBMp7cDZiexCgWmOWVJsMArS9FOUCqF1nUCLDty6MUlaMvsMvg0HRE 9J9OS1KxQ2/msQsUzzjHvbj+OVT+EYmTB4ZXvjfGjahzl+xzd0RphEfTdK6AMnyc5Lpv 0z2OT2wVSYxJbfg7H5C6SqhKJVFA73kfW/yYm90sQbVVDl3y1VJPFOpSZETrE9Lt7mRk 7gzA==
X-Gm-Message-State AD7BkJJsMN7+wD8sfW9T1EcrDUVUXFre8OqqqC0xNPaW0nzPMCOhNaJ822j8+exqQEiLDviQ97Qm0uU80qovkQ==
X-Received by 10.107.128.104 with SMTP id b101mr2047363iod.31.1458722709022; Wed, 23 Mar 2016 01:45:09 -0700 (PDT)
In-Reply-To <nctkgu$p7s$1@aspen.stu.neva.ru>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:105526

Show key headers only | View raw


On Wed, Mar 23, 2016 at 7:35 PM, Hongyi Zhao <hongyi.zhao@gmail.com> 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 by logging out and in again, or rebooting; it
>> depends how your system is configured.
>
> I tried and find that I must set the variable in .profile file, instead
> of .bashrc, in order to let the IDEs started from my GUI to recognize
> them after I logged out and in again.

Yep, that would do it! Sometimes your GUI will be started from an
interactive shell (or one that thinks it's interactive), in which case
.bashrc will be processed, but in your case, .profile is the solution.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Obtain the variable in bash. Hongyi Zhao <hongyi.zhao@gmail.com> - 2016-03-23 07:12 +0000
  Re: Obtain the variable in bash. Chris Angelico <rosuav@gmail.com> - 2016-03-23 18:19 +1100
    Re: Obtain the variable in bash. Hongyi Zhao <hongyi.zhao@gmail.com> - 2016-03-23 08:35 +0000
      Re: Obtain the variable in bash. Chris Angelico <rosuav@gmail.com> - 2016-03-23 19:45 +1100
  Re: Obtain the variable in bash. Ben Finney <ben+python@benfinney.id.au> - 2016-03-23 19:08 +1100

csiph-web