■ expanduser 함수를 사용해 현재 사용자 디렉토리와 파일/디렉토리 경로를 사용해 절대 경로를 구하는 방법을 보여준다.
▶ 예제 코드 (PY)
1 2 3 4 5 6 7 8 9 |
import os.path print(os.path.expanduser("~\\test")) r""" C:\Users\king\test """ |
■ expanduser 함수를 사용해 현재 사용자 디렉토리와 파일/디렉토리 경로를 사용해 절대 경로를 구하는 방법을 보여준다.
▶ 예제 코드 (PY)
1 2 3 4 5 6 7 8 9 |
import os.path print(os.path.expanduser("~\\test")) r""" C:\Users\king\test """ |