반응형
Python에서 Directory가 없으면 생성하는 코드
코드
- python create directory if not exists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
if not os.path.exists(directory): | |
os.makedirs(directory) |
반응형
'Programming > Python' 카테고리의 다른 글
파이썬 HTML 파싱 하는 방법 (0) | 2017.11.02 |
---|---|
파이썬 스케일이 다른 그래프 (0) | 2017.11.02 |
파이썬 데이터 읽기 (pandas) (0) | 2017.11.02 |
[Python] Flask Response Encoding 문제 (0) | 2017.02.07 |
[Python] Flask logging 하는 방법 (0) | 2017.02.07 |