[New-bugs-announce] [issue9882] abspath from directory

ipatrol report at bugs.python.org
Fri Sep 17 02:21:57 CEST 2010


New submission from ipatrol <ipatrol6010 at yahoo.com>:

Just an easy patch.

os.path.abspath is defined as os.path.normpath(os.path.join(os.getcwd(),path), but os.path.relpath also adds a start option. This creates an asymmetry where getting the absolute path from a relative path and a directory has no single operation whereas the inverse does. So finding the absolute path of 'foo' in the directory '/bar/buzz/bang/quok' requires several nested functions or else a quick dash in with os.chdir. Hence redefining os.path.abspath as os.path.normpath(os.path.join(start or os.getcwd(),path).

----------
components: Library (Lib)
messages: 116643
nosy: ipatrol
priority: normal
severity: normal
status: open
title: abspath from directory
type: feature request
versions: Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9882>
_______________________________________


More information about the New-bugs-announce mailing list