parameters: (pathname)
return_statement: return os.path.join(*paths)
docstring: Return 'pathname' as a name that will work on the native filesystem,
      i.e. split it on '/' and put it back together again using the current
      directory separator.  Needed because filenames in the setup script are
      always supplied in Unix style, and have to be converted to the local
      convention before we can actually use them in the filesystem.  Raises
      ValueError on non-Unix-ish systems if 'pathname' either starts or
      ends with a slash.
docstring_summary: Return 'pathname' as a name that will work on the native filesystem,
      i.e. split it on '/' and put it back together again using the current
      directory separator.  Needed because filenames in the setup script are
      always supplied in Unix style, and have to be converted to the local
      convention before we can actually use them in the filesystem.  Raises
      ValueError on non-Unix-ish systems if 'pathname' either starts or
      ends with a slash.
docstring_tokens: Return pathname as a name that will work on the native filesystem i . e . split it on / and put it back together again using the current directory separator . Needed because filenames in the setup script are always supplied in Unix style and have to be converted to the local convention before we can actually use them in the filesystem . Raises ValueError on non - Unix - ish systems if pathname either starts or ends with a slash .
function: def convert_path (pathname):
      """Return 'pathname' as a name that will work on the native filesystem,
      i.e. split it on '/' and put it back together again using the current
      directory separator.  Needed because filenames in the setup script are
      always supplied in Unix style, and have to be converted to the local
      convention before we can actually use them in the filesystem.  Raises
      ValueError on non-Unix-ish systems if 'pathname' either starts or
      ends with a slash.
      """
      if os.sep == '/':
          return pathname
      if not pathname:
          return pathname
      if pathname[0] == '/':
          raise ValueError("path '%s' cannot be absolute" % pathname)
      if pathname[-1] == '/':
          raise ValueError("path '%s' cannot end with '/'" % pathname)
  
      paths = pathname.split('/')
      while '.' in paths:
          paths.remove('.')
      if not paths:
          return os.curdir
      return os.path.join(*paths)
function_tokens: def convert_path ( pathname ) : if os . sep == '/' : return pathname if not pathname : return pathname if pathname [ 0 ] == '/' : raise ValueError ( "path '%s' cannot be absolute" % pathname ) if pathname [ - 1 ] == '/' : raise ValueError ( "path '%s' cannot end with '/'" % pathname ) paths = pathname . split ( '/' ) while '.' in paths : paths . remove ( '.' ) if not paths : return os . curdir return os . path . join ( * paths )