Find out link location
holger krekel
pyth at devel.trillke.net
Mon Sep 30 09:05:14 EDT 2002
Klaus Hoeppner wrote:
> Hi,
>
> with the os.path module I can use the islink function to check, wether
> a file is symbolic link. But how can I find out, where the link points
> to. E.g. if I have readme.txt --> ../packages/mypackage/readme.txt how
> do I get the "../packages/mypackage/readme.txt" with python?
import os
os.readlink('/path/to/link')
regards,
holger
More information about the Python-list
mailing list