current directory = working directory = [[파이썬,Python]]에서 현재 디렉터리 / 작업 디렉터리 = 를 얻는 방법 {{{ import os os.getcwd() }}} 를 바꾸는 방법 {{{ os.chdir("/some/directory") }}} ---- Up: [[Source_code_snippets]] [[디렉터리,directory]] { AKA '''디렉토리''' Sub: subdirectory [[트리,tree]] 구조. [[filesystem]] / [[file_system]]의 구성 요소. [[파일,file]]들을 담고 있음. Rel: [[폴더,folder]]. Python에서 하위 directory들을 훑으려면 {{{os.walk()}}} 함수를 사용. {{{ for root, dirs, files in os.walk(os.getcwd()): print(files) }}} 그 중 특정 확장자 파일만 찾고 싶다면, {{{ for root, dir, files in os.walk(os.getcwd()): for f in files: a = os.path.splitext(f)[-1] if a == ‘.xml’: print(f) }}} Sources: https://wikidocs.net/21049 Sub: [[현재_디렉터리_얻기,gettting_current_directory]] ---- (wikiadmin) Srch:디렉토리 Srch:디렉터리 diretory = 디렉터리 via https://kornorms.korean.go.kr/example/exampleList.do } ---- RENAMETHISPAGE (t가 세개)