系统路径
获得当前路径
os.getcwd()
文件操作
新建文件
if no os.path.exists(file_path):
os.makedirs(file_path)
软链接
src = '/usr/bin/python'
dst = '/tmp/python'
# 创建软链接
os.symlink(src, dst)
获得当前路径
os.getcwd()
if no os.path.exists(file_path):
os.makedirs(file_path)
src = '/usr/bin/python'
dst = '/tmp/python'
# 创建软链接
os.symlink(src, dst)