Answers for "get the working directory of folder that python script is located"

19

get working directory python

import os
os.getcwd()
Posted by: Guest on May-23-2020
-1

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
Posted by: Guest on January-13-2021

Code answers related to "get the working directory of folder that python script is located"

Python Answers by Framework

Browse Popular Code Answers by Language