Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get directory of current script file

import os
os.path.abspath(__file__) # Directory of current python script
#Output will look something like: C:UsersUserNameDesktoppy-script.py
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #directory #current #script #file
ADD COMMENT
Topic
Name
4+2 =