작업실 & 그외
python 현재 디렉토리 위치
S
SDK
2017년 12월 8일 오후 06:56
조회 1 공감 0
import os print (os.getcwd()) #현재 디렉토리의
print (os.path.realpath(__file__))#파일
print (os.path.dirname(os.path.realpath(__file__)) )#파일이 위치한 디렉토리
import sys
sys.path
파이썬 환경변수 (윈도우)
set PYTHONPATH=C:\Python
디렉토리 변경
import os
os.chdir("C:\WINDOWS")
os.getcwd()
os.system("dir")
f = os.popen("dir")
댓글 (0)
- 아직 댓글이 없습니다. 첫 댓글을 작성해보세요!
댓글을 작성하려면 이 필요합니다.