Global join function?

Discussion in 'Python' started by Darrel Grant, Mar 14, 2012.

  1. Darrel Grant

    Darrel Grant Guest

    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.
     
    Darrel Grant, Mar 14, 2012
    #1
    1. Advertisements

  2. Darrel Grant

    Jon Clements Guest

    On Wednesday, 14 March 2012 18:41:27 UTC, Darrel Grant 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.
    >
    > 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
     
    Jon Clements, Mar 14, 2012
    #2
    1. Advertisements

  3. Darrel Grant

    Jon Clements Guest

    On Wednesday, 14 March 2012 18:41:27 UTC, Darrel Grant 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.
    >
    > 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
     
    Jon Clements, Mar 14, 2012
    #3
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alan Silver
    Replies:
    0
    Views:
    975
    Alan Silver
    Jun 5, 2006
  2. googleboy
    Replies:
    1
    Views:
    1,019
    Benji York
    Oct 1, 2005
  3. john_re
    Replies:
    0
    Views:
    284
    john_re
    Jun 20, 2009
  4. john_re
    Replies:
    0
    Views:
    284
    john_re
    Nov 7, 2009
  5. giovanni_re
    Replies:
    0
    Views:
    268
    giovanni_re
    Jan 11, 2010
Loading...

Share This Page