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


Groups > comp.lang.python > #21621

Re: Global join function?

Path csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'used.': 0.07; 'url:pypi': 0.08; '>>>>': 0.09; 'global,': 0.09; 'googling': 0.09; 'nameerror:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'bootstrap': 0.16; 'elsewhere,': 0.16; 'received:dip.t-dialin.net': 0.16; 'received:t-dialin.net': 0.16; 'subject:function': 0.16; 'url:virtualenv': 0.16; 'this:': 0.16; 'wrote:': 0.18; 'seems': 0.20; '(most': 0.21; 'from:addr:web.de': 0.23; 'seemingly': 0.23; 'defined': 0.24; 'string': 0.24; 'traceback': 0.24; 'function': 0.27; 'import': 0.27; 'tried': 0.27; 'code,': 0.28; 'example': 0.29; "skip:' 10": 0.29; 'arguments.': 0.30; 'clear,': 0.30; 'subject:?': 0.31; "i've": 0.32; 'there': 0.33; 'header:User-Agent:1': 0.33; 'file': 0.34; 'header:X-Complaints-To:1': 0.34; 'last):': 0.34; 'probably': 0.35; 'to:addr:python-list': 0.35; 'url:python': 0.35; 'received:org': 0.36; 'but': 0.37; 'skip:" 10': 0.37; 'think': 0.38; 'url:org': 0.39; 'point': 0.40; 'to:addr:python.org': 0.40; 'join': 0.61; 'is.': 0.63; 'results': 0.64; 'subject:join': 0.64; 'show': 0.66; 'join,': 0.84; 'subject:Global': 0.95
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: Global join function?
Date Wed, 14 Mar 2012 19:59:03 +0100
Organization None
References <CAGbOqHbN_K-DZek_Vv8iFKcAL-Os6zLKtWhhO=e895=-uX3Y-g@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host p5084a5e5.dip.t-dialin.net
User-Agent KNode/4.7.3
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.646.1331751531.3037.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1331751531 news.xs4all.nl 6868 [2001:888:2000:d::a6]:41373
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:21621

Show key headers only | View raw


Darrel Grant wrote:

> In the virtualenv example bootstrap code, a global join function is used.
> 
> http://pypi.python.org/pypi/virtualenv

At this point there is probably an import that you have overlooked:

from os.path import join

>     subprocess.call([join(home_dir, 'bin', 'easy_install'),
>                      'BlogApplication'])
> 
> 
> In interpeter, I tried this:
> 
>>>> [join([], 'bin', 'easy_install')]
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> NameError: name 'join' is not defined
> 
> I think I've seen this used elsewhere, but googling only seems to show
> results about the string method join, not whatever this is.
> 
> To be clear, I understand how to use "".join(list), but have not found
> any information about this other, seemingly global, join function
> which takes multiple arguments. It's been bugging me.

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


Thread

Re: Global join function? Peter Otten <__peter__@web.de> - 2012-03-14 19:59 +0100

csiph-web