from datetime import date, time, datetime, timedelta
from operator import itemgetter
import sys
import glob
import os
os
모듈을 임포트하면 유용한 경로 함수들을 이용할 수 있다. 예를 들어
os
.
path
.
join
함수는
지능적으로 하나 이상의 경로를 구성하는 요소들을 서로 합친다.
glob
모듈은 특정 패턴과 일
치하는 모든 경로명을 찾는다.
os
와
glob
을 결합하여 이용하면, 특정 폴더 내에 존재하는 특정
한 패턴을 지닌 모든 파일을 찾을 수 있다.
다수의 파일을 열기 위해 텍스트 파일을 또 하나 생성해보자.
1.6.1
또 다른 텍스트 파일 만들기
1
스파이더
IDE
나 텍스트 편집기를 실행한다.
2
빈 텍스트 파일에 다음과 같이
8
줄을 작성한다(그림
1
-
13
).
This
text
comes
from
a
different ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.