[Tutor] python equivalent of perl readlink()?

Michael P. Reilly arcege at gmail.com
Mon Oct 16 03:39:02 CEST 2006


On 10/15/06, Bill Campbell <bill at celestial.net> wrote:
>
> Is there a python equivalent of the perl readlink() function
> (e.g. one that returns the relative path in cases where a command
> such as ``ln -s ls /usr/local/bin/gls'' created the link?
>
> Reading the documentation on the various os.path functions, the
> only thing I see returns the fully resolved path rather than the
> relative one (/usr/local/bin/ls in the case above).
>
> Bill
>

The function is in the os module (
http://docs.python.org/lib/os-file-dir.html).
    -Arcege

-- 
There's so many different worlds,
So many different suns.
And we have just one world,
But we live in different ones.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061015/3c77f5fc/attachment-0001.htm 


More information about the Tutor mailing list