0x0000000000000000  13:1 pó ,º]c@@sGddlmZddlmZer3ddlTneZddlTdS(i(tabsolute_import(tPY3(t*N(t __future__Rt future.utilsRtdbm.gnutTruet__future_module__tgdbm(((s8/usr/lib/python2.7/site-packages/future/moves/dbm/gnu.pyts  1Ë:mod:`os.path` --- Common pathname manipulations ================================================ .. module:: os.path :synopsis: Operations on pathnames. .. index:: single: path; operations This module implements some useful functions on pathnames. To read or write files see :func:`open`, and for accessing the filesystem see the :mod:`os` module. .. note:: On Windows, many of these functions do not properly support UNC pathnames. :func:`splitunc` and :func:`ismount` do handle them correctly. Unlike a unix shell, Python does not do any *automatic* path expansions. Functions such as :func:`expanduser` and :func:`expandvars` can be invoked explicitly when an application desires shell-like path expansion. (See also the :mod:`glob` module.) .. note:: Since different operating systems have different path name conventions, there are several versions of this module in the standard library. The :mod:`os.path` module is always the path module suitable for the operating system Python is running on, and therefore usable for local paths. However, you can also import and use the individual modules if you want to manipulate a path that is *always* in one of the different formats. They all have the same interface: * :mod:`posixpath` for UNIX-style paths * :mod:`ntpath` for Windows paths * :mod:`macpath` for old-style MacOS paths * :mod:`os2emxpath` for OS/2 EMX paths .. function:: abspath(path) Return a normalized absolutized version of the pathname *path*. On most platforms, this is equivalent to calling the function :func:`normpath` as follows: ``normpath(join(os.getcwd(), path))``. .. versionadded:: 1.5.2 .. function:: basename(path) Return the base name of pathname *path*. This is the second element of the pair returned by passing *path* to the function :func:`split`. Note that the result of this function is different from the Unix :program:`basename` program; where :program:`basename` for ``'/foo/bar/'`` returns ``'bar'``, the :func:`basename` function returns an empty string (``''``). .. function:: commonprefix(list) Return the longest path prefix (taken character-by-character) that is a prefix of all paths in *list*. If *list* is empty, return the empty string (``''``). Note that this may return invalid paths because it works a character at a time. .. function:: dirname(path) Return the directory name of pathname *path*. This is the first element of the pair returned by passing *path* to the function :func:`split`. .. function:: exists(path) Return ``True`` if *path* refers to an existing path. Returns ``False`` for broken symbolic links. On some platforms, this function may return ``False`` if permission is not granted to execute :func:`os.stat` on the requested file, even if the *path* physically exists. .. function:: lexists(path) Return ``True`` if *path* refers to an existing path. Returns ``True`` for broken symbolic links. Equivalent to :func:`exists` on platforms lacking :func:`os.lstat`. .. versionadded:: 2.4 .. function:: expanduser(path) On Unix and Windows, return the argument with an initial component of ``~`` or ``~user`` replaced by that *user*'s home directory. .. index:: module: pwd On Unix, an initial ``~`` is replaced by the environment variable :envvar:`HOME` if it is set; otherwise the current user's home directory is looked up in the password directory through the built-in module :mod:`pwd`. An initial ``~user`` is looked up directly in the password directory. On Windows, :envvar:`HOME` and :envvar:`USERPROFILE` will