Python,module glob
glob모듈은 윈도우의 dir명령어나 리눅스의 ls명령어와 유사한 기능을 제공함-. glob.glob(path)glob()함수는 경로에 대응되는 모든 파일 및 디렉토리의 리스트를 반환'*'와 '?'사용가능하며 [,]문자를 사용한 문자열비교도 가능함>>> glob.glob('file*') #"*"문자 사용['File1.MP3', 'File2.MP3']>>> glob.glob('file?.mp3') #"?"문자 사용['File1.MP3', 'File2.MP3']>>> glob.glob('file[1-9].mp3') #"[ ]"를 이용한 문자열비교 사용['File1.MP3', 'File2.MP3']또한 경로를 주는 방식에 따라 절대경로로 결과가 나오게 할수도 있음.>>> glob.glob('*.exe')['p..
Python
2016. 4. 29. 12:49
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- FetchType
- highlightthickness
- 폼
- checkbutton
- IdClass
- activebackground
- activeforeground
- Private
- vba
- tkinter command & bind [명령어묶기와 사건묶기] Python
- command
- Excel
- borderwidth
- Module
- Python
- JPA
- tkinter
- ManyToOne
- 상수
- fetch join
- highlightbackground
- Java
- indicatoron
- Linux
- apache
- 리눅스
- Composite Key
- disabledforeground
- onetomany
- 파이썬
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함