모든글, 작업실 & 그외

python 현재 디렉토리 위치

 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”) […]

python 현재 디렉토리 위치 Read Post »