橘子味的心
标题:Python3 os 模块 Readlink 方法

Python3 os 模块 Readlink 方法

# !/usr/bin/python3
import os

src = 'd://tmp//python3'
dst = 'd://tmp//python2'

# This creates a symbolic link on python in tmp directory
os.symlink(src, dst)

# Now let us use readlink to display the source of the link.
path = os.readlink( dst )
print (path)

目录

分类