Global join function?

D

Darrel Grant

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.

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.
 
J

Jon Clements

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.

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.

os.path.join

Jon
 
J

Jon Clements

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.

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.

os.path.join

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top