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


Groups > comp.lang.python > #96234

Re: setenv

Path csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'preferably': 0.05; 'correct.': 0.07; 'cc:addr:python-list': 0.09; 'python.': 0.11; 'question.': 0.13; 'do,': 0.15; 'thu,': 0.15; 'echo': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hi:': 0.16; 'variable.': 0.16; 'wrote:': 0.16; 'shell': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'skip:v 30': 0.20; 'install,': 0.22; 'sep': 0.22; 'trying': 0.22; 'bit': 0.23; 'this:': 0.23; 'header:In-Reply-To:1': 0.24; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; 'environment': 0.29; "i'm": 0.30; 'folder': 0.30; 'skip:/ 20': 0.33; 'case,': 0.34; 'this?': 0.34; 'add': 0.34; 'received:google.com': 0.35; 'so,': 0.35; 'text': 0.35; 'something': 0.35; 'but': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'skip:v 20': 0.38; 'files': 0.38; 'rather': 0.39; 'export': 0.63; 'you.': 0.64; 'sounds': 0.76; 'chrisa': 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 :content-type; bh=AVnt1o7oWBObvrGDFUWBBTfPkImAvH21ePQOZiQy7VM=; b=dAlqcSvESwzWtXiho3NqBGi1yh5qWafAW1mk49OVwgjRbMQkWTr+bP0pfV7x+A9JgI oXVeFeQrz9awMkS2COfFENBt5C2jW3BtW06HtgYXMUTruOKsOjt8qeFSFcMi6cj+CGU5 hZWdOQmIQy+ipNS+Zdmlyq9LCZzaKMFyMD0+CI3ANHJ/6idbKGtji6/wKZ79P/5cOeLE NMXpIGLu5QhY6JqzzJJ6iABh3306W4GgpiT2cJhAajntRVgsUymWuFPX7c3D1Ku5ceqt kxctyliP5xRzF6+ZZn/kIGADEIQRLTOgVaREeTlR8Pu2hc1pTYPR7HekBSxX8LjH3bxl oIpg==
MIME-Version 1.0
X-Received by 10.50.50.198 with SMTP id e6mr2044188igo.13.1441859693256; Wed, 09 Sep 2015 21:34:53 -0700 (PDT)
In-Reply-To <55F0FFE2.6080908@inhand.com.cn>
References <55F0FFE2.6080908@inhand.com.cn>
Date Thu, 10 Sep 2015 14:34:53 +1000
Subject Re: setenv
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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>
Newsgroups comp.lang.python
Message-ID <mailman.301.1441859702.8327.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1441859702 news.xs4all.nl 23829 [2001:888:2000:d::a6]:50832
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:96234

Show key headers only | View raw


On Thu, Sep 10, 2015 at 1:58 PM, chenchao@inhand.com.cn
<chenchao@inhand.com.cn> wrote:
> hi:
>    This is not a question about python. It is a shell question. I'm sorry to
> bother you. But I really want to know it. As follow:
>    I want to set a shell environment variable:PYTHONPATH. When i execute
> echo $PYTHONPATH, it is
> value:/usr/lib/python/Lib:/usr/lib/python/lib/python27.zip:/var/app/python/libs/pip-lib.zip.
> Now, I want to add value to it. The value is all files in a folder with
> the.zip end. For install, directory(/var/app/python/libs/) include gpio.zip,
> a.zip, b.zip and so on. So I want to add
> value:/var/app/python/libs/gpio.zip, /var/app/python/libs/a.zip,
> /var/app/python/libs/b.zip to environment variable:PYTHONPATH. I execute
> cmd: export PYTHONPATH='/var/app/python/libs/*zip':$PYTHONPATH, but its
> value is not correct. So, how can i do this? My program use setenv to set
> environment variable.

Sounds to me like you want something like this:

http://stackoverflow.com/questions/3430569/globbing-pathname-expansion-with-colon-as-separator

If that's not the case, can you elaborate a bit on what you're trying
to do, preferably in pure text rather than relying on HTML?

ChrisA

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


Thread

Re: setenv Chris Angelico <rosuav@gmail.com> - 2015-09-10 14:34 +1000

csiph-web