Global join function?

Chris Rebert clp2 at rebertia.com
Wed Mar 14 14:54:32 EDT 2012


On Wed, Mar 14, 2012 at 11:41 AM, Darrel Grant <darrel343 at 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


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /