Programming Language/Python
[Python] 파이썬 현재 경로(디렉토리) getcwd() 쓰세요.
뒹굴거리는프로도
2023. 2. 9. 13:11
반응형
[Python] 파이썬 현재 경로(디렉토리) getcwd() 쓰세요.
구문
import os
print( os.getcwd() )
설명
getcwd()는 현재 디렉토리를 문자열로 반환하는 함수입니다.
참조
파이썬 도큐먼트
https://docs.python.org/3.11/library/os.html?highlight=getcwd#os.getcwd
os — Miscellaneous operating system interfaces
Source code: Lib/os.py This module provides a portable way of using operating system dependent functionality. If you just want to read or write a file see open(), if you want to manipulate paths, s...
docs.python.org
os.getcwd()
Return a string representing the current working directory.
반응형