replace readlink with python_readlink