How to know, in Python, that the directory you are in is inside a symbolic link ?
I have a directory /tmp/foo/kiwi
I create a symlink /tmp/bar pointing to /tmp/foo
I enter into /tmp/bar/kiwi
the linux command pwd tells me I'm in /tmp/bar/kiwi, which is correct.
The python command prompt tells me I'm in /tmp/foo/kiwi:
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getcwd()
'/tmp/foo/kiwi'
Is there a way, in Python, to get the directory I'm really in ?