Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python set cwd to file location

import os

abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)
 
PREVIOUS NEXT
Tagged: #python #set #cwd #file #location
ADD COMMENT
Topic
Name
6+2 =