One - One Code All

Blog Content

python判断文件是否存在,不存在则创建

Python   2008-12-30 21:14:03

python判断文件是否存在,不存在则创建。

def _mkdir_output(self, file_dir):
    if not os.path.exists(file_dir):
    os.makedirs(file_dir)



上一篇:Python进行JSON格式化输出
下一篇:python判断字符串是否为合法的json格式

The minute you think of giving up, think of the reason why you held on so long.