python 判断文件夹是否存在

来源:互联网 发布:最新义乌法院淘宝拍卖 编辑:程序博客网 时间:2024/03/29 13:44
>>> 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
原创粉丝点击