DoctorKey 的博客

开始使用

Python 与系统相关的操作

系统路径

获得当前路径

os.getcwd()

文件操作

新建文件

if no os.path.exists(file_path):
	os.makedirs(file_path)

软链接

src = '/usr/bin/python'
dst = '/tmp/python'

# 创建软链接
os.symlink(src, dst)
评论
留下你的脚步