os.getcwd 와 os.path.dirname(__file__) 차이
조회수 539회
제목 그대로 두개의 차이를 알고싶습니다. 코드를 실행시킨 결과는
print(__file__)
print(os.path.dirname(__file__))
print(os.getcwd())
C:/Users/Desktop/pythonedit/API/api df.py
C:/Users/Desktop/pythonedit/API
C:\Users\Desktop\pythonedit\API
첫번째가 실행시킨 파일의 위치와 이름까지 나오는건 알고 있습니다. os.path.dirname(file)과 os.getcwd()의 차이는 무엇인가요..?
-
(•́ ✖ •̀)
알 수 없는 사용자
댓글 입력