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


Groups > comp.lang.python > #21619

Re: Global join function?

References <CAGbOqHbN_K-DZek_Vv8iFKcAL-Os6zLKtWhhO=e895=-uX3Y-g@mail.gmail.com>
Date 2012-03-14 11:54 -0700
Subject Re: Global join function?
From Chris Rebert <clp2@rebertia.com>
Newsgroups comp.lang.python
Message-ID <mailman.645.1331751274.3037.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Mar 14, 2012 at 11:41 AM, Darrel Grant <darrel343@gmail.com> wrote:
> In the virtualenv example bootstrap code, a global join function is used.
>
> http://pypi.python.org/pypi/virtualenv
>
>    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.

Those example snippets are broken. They're presumably missing the line:
    from os.path import join
Docs for the function in question:
http://docs.python.org/library/os.path.html#os.path.join

Cheers,
Chris

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


Thread

Re: Global join function? Chris Rebert <clp2@rebertia.com> - 2012-03-14 11:54 -0700

csiph-web