How to get the realpath of a symbolic link?

Terry Reedy tjreedy at udel.edu
Sun Nov 1 00:28:53 EDT 2009


Peng Yu wrote:

> I find the following two files that define realpath. But I don't find
> 'realpath' in os.py. I looked at 'os.py'. But I don't understand how
> the function realpath is introduced in the name space in os.path.
> Would you please let me know?
> 
> gfind . ! -path '*backup*' -name "*.py" -type f -exec grep -n "def
> realpath" {} \; -printf %p\\n\\n
> 193:def realpath(path):
> ./macpath.py
> 
> 345:def realpath(filename):
> ./posixpath.py

That is where realpath is.




More information about the Python-list mailing list