How to get the realpath of a symbolic link?

Terry Reedy tjreedy at
Sun Nov 1 05:28:53 CET 2009

Peng Yu wrote:

> I find the following two files that define realpath. But I don't find
> 'realpath' in I looked at ''. 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):
> ./
> 345:def realpath(filename):
> ./

That is where realpath is.

More information about the Python-list mailing list