반응형
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 | 31 |
Tags
- GIT
- Github
- Google Spreadsheet
- math
- google apps script
- list
- gas
- Google Excel
- PANDAS
- array
- PostgreSQL
- Python
- hive
- Presto
- Excel
- string
- Apache
- dataframe
- Tkinter
- SQL
- c#
- Kotlin
- Redshift
- 파이썬
- matplotlib
- django
- Java
- numpy
- PySpark
Archives
- Today
- Total
목록iglob (1)
달나라 노트
Python glob : iglob (폴더 속 폴더 까지 모든 파일 list 추출)
간혹 어떤 기준되는 폴더 안에 있는 모든 파일 list를 얻고 싶을 때가 있습니다.근데 단순히 어떤 폴더 안에 담긴 것이 아니라 폴더 속 폴더 속 폴더 속의 파일 같이 다중으로 구성된 directory의 모든 파일 리스트를 얻고싶을 때가 있죠.이때는 iglob를 사용하면 유용합니다. glob.iglob(directory, recursive=True/False) 사용법은 위와 같습니다.잘 모르겠으니 예시를 통해서 알아봅시다. 예시에서의 목적은 다음과 같습니다."내가 원하는 폴더 안에 있는 모든 파일과, 모든 폴더 속에 담긴 파일까지 모두 return하라." import glob# 기준 folderroot_path = '/Users/Documents/code/pythonProject/**' # 1# ..
Python/Python glob
2026. 1. 3. 14:22