How to check if command line argument is file or not in python?
This question already has an answer here:
简单和简单的答案。
import os.path
os.path.isfile(fname)
链接地址: http://www.djcxy.com/p/7306.html
上一篇: 检查文件是否存在,如果不存在则创建它