On 10/31/2009 12:03 AM Peng Yu said...
Suppose that I have the following directory and files. I want to get
the canonical path of a file, a directory or a symbolic link.
For example, for 'b' below, I want to get its canonical path as
'/private/tmp/abspath/b'.

So, why isn't realpath working for you? It looks like it is, and it works that way here:

>>> os.path.realpath('/home/emile/vmlinuz')
'/root/vmlinuz-2.4.7-10'


Emile

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to