Os Readlink
# Python2.x Python os.readlink() Method
[ Python OS File/Directory Methods](#)
* * *
### Overview
The os.readlink() method is used to return the file pointed to by a soft link (symbolic link). It may return an absolute or relative path.
Available on Unix
### Syntax
The syntax format of the **readlink()** method is as follows:
os.readlink(path)
### Parameters
* **path** -- The soft link path to look up
### Return Value
Returns the file pointed to by the soft link
### Example
The following example demonstrates the use of the readlink() method:
#!/usr/bin/python# -*- coding: UTF-8 -*-import os src = '/usr/bin/python' dst = '/tmp/python'# Create symlink using os.symlink(src, dst)# Display source link path using symlink = os.readlink( dst )print
YouTip