티스토리 뷰
windows 에서 rglob 을 통해 파일(*.ext)을 읽어들이면 파일 확장자에 insensitive해서 대문자 (*.EXT) 든 소문자(*.ext)든 알아서 잘 읽는다.
linux 계열에서는 rglob을 통해 파일을 읽어들일때는 파일 확장자에 sensitive 하다. 그래서, 대문자, 소문자 둘다 읽어들이려면 별도의 후처리가 필요하다. 삽질을 안하려면 대문자, 소문자를 통일 시켜줄 필요가 있다.
아 근데 이건 rglob 에 국한된 건 아니고 glob.glob 도 마찬가지 일거 같고, 여타 파일 읽기/쓰기가 필요한 모든 코드에 적용되는 사항같다.
https://superuser.com/questions/862270/convention-for-file-extensions-uppercase-or-lowercase
Convention for file extensions: uppercase or lowercase
Is there a convention for the case of the file extension in Windows, i.e. all uppercase vs. all lowercase? If there is, what is the reason, if any, for the convention, or is it just for the purpos...
superuser.com
https://superuser.com/questions/881804/case-sensitive-file-extensions-in-windows-and-linux
Case sensitive file extensions in Windows and Linux
In linux you can have the files example.JPG and example.jpg in the same directory. In Windows you have case sensitive extensions, but you can't put these two files in the same directory. Why not?
superuser.com
'Python' 카테고리의 다른 글
Python atexit를 이용한 프로그램 종료시 수행되어야 할 동작 정의해주는 방법 (0) | 2024.02.16 |
---|---|
commitcleaner commit 초기화를 한 줄로! ChatGPT4 님이 만들어주셨습니다. (2) | 2024.01.31 |
[Python] urllib.request.urlretrieve, tqdm 이용하여 프로그레스바 출력하며 파일 다운로드하기 (0) | 2023.09.30 |
[Python] Generator 합치기 (0) | 2023.04.26 |
[Python] Conda Python 3.11 지원 (0) | 2023.04.23 |
- Total
- Today
- Yesterday
- 순열
- LCA
- 백준 1766
- 이분탐색
- 백준
- 자료구조
- 백준 11437
- 문제집
- 인공지능을 위한 선형대수
- ㅂ
- Lowest Common Ancestor
- C++ Deploy
- 가장 긴 증가하는 부분 수열
- 위상 정렬 알고리즘
- 백준 11053
- MOT
- 단축키
- cosine
- 조합
- PyCharm
- 백트래킹
- FairMOT
- 파이참
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |