■ iglob 함수를 사용해 입력 경로의 모든 파일 및 디렉토리에 대한 이터레이터를 구하는 방법을 보여준다.
▶ 예제 코드 (PY)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import glob generator1 = glob.iglob("c:\\windows\\*[0-9][0-9].exe") for filePath in generator1: print(filePath) """ c:\windows\splwow64.exe c:\windows\Twunk_16.exe c:\windows\Twunk_32.exe c:\windows\winhlp32.exe """ |