Find out link location

Pedro RODRIGUEZ pedro_rodriguez at club-internet.fr
Mon Sep 30 09:02:59 EDT 2002


On Mon, 30 Sep 2002 14:26:47 +0200, Klaus Hoeppner wrote:

> 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?
> 

in http://www.python.org/doc/current/lib/os-file-dir.html :

os.readlink("readme.txt")

Pedro



More information about the Python-list mailing list