python 判断文件夹 文件 是否存在

来源:互联网 发布:高效阅读的软件 编辑:程序博客网 时间:2024/04/18 20:22
>>> import os>>> os.path.exists('d:/assist')True>>> os.path.exists('d:/assist/getTeacherList.py')True>>> os.path.isfile('d:/assist')False>>> os.path.isfile('d:/assist/getTeacherList.py')True>>> os.makedirs('d:/assist/set')>>> os.path.exists('d:/assist/set')True


 

0 0
原创粉丝点击