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


Groups > comp.lang.python > #21621 > unrolled thread

Re: Global join function?

Started byPeter Otten <__peter__@web.de>
First post2012-03-14 19:59 +0100
Last post2012-03-14 19:59 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#21621 — Re: Global join function?

FromPeter Otten <__peter__@web.de>
Date2012-03-14 19:59 +0100
SubjectRe: Global join function?
Message-ID<mailman.646.1331751531.3037.python-list@python.org>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web