IT기술 관련/파이썬_루비 등 언어
[Python] [python]os.path.exists() 파일 존재 체크하기
호레
2015. 11. 30. 11:28
반응형
#!/usr/bin/python
import os
if not os.path.exists("./test.txt"):
print "test.txt file not exist"
if os.path.exists("./test.txt"):
print "test.text file exist"
반응형