[Tutor] Attribute Error
Remco Gerlich
scarblac@pino.selwerd.nl
Tue, 19 Jun 2001 12:19:14 +0200
On 0, fasal.waseem@cis.co.uk wrote:
> Hi All
>
> is abspath an attribute of 1.5, if not is there some equivalent of it.
I think you're talking about os.path.abspath().
It's not in 1.5, but was new in 1.5.2; the current documentation says:
(http://www.python.org/doc/current/lib/module-os.path.html)
abspath(path)
Return a normalized absolutized version of the pathname 'path'. On most
platforms, this is equivalent to
os.path.normpath(os.path.join(os.getcwd(), path))
New in version 1.5.2.
That line (basically adds the current directory and the path together and
normalizes it) should work.
--
Remco Gerlich