Mostly Linux & Python syntax notes and hyperlinks.

Monday, October 24, 2011

python: real path after symbolic link

After calling a library method that renamed a file and linked it, I needed the name it renamed it to.

  filename=os.path.basename(os.path.realpath(symbolicLinkName))

 More at http://www.python.org/doc//current/library/os.path.html