python exists

来源:互联网 发布:psd文件打开软件 编辑:程序博客网 时间:2024/05/22 02:28

from os.path import exists    #导入exists


print "dose the file exist? %r" % exists(filename)

#exists(filename)返回"True" or "False",格式化输出用%r 

0 0
原创粉丝点击