Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python change working directory to file directory

import os

abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)
 
PREVIOUS NEXT
Tagged: #python #change #working #directory #file #directory
ADD COMMENT
Topic
Name
2+9 =