Answers for "know in which directory python script is running"

15

how to check in which directory python in running

import os
cwd = os.getcwd()
Posted by: Guest on March-09-2020
0

how to find in which directory my python code is running

import os
dir_where_my_py_code_is_running = os.getcwd()
print(dir_where_my_py_code_is_running)    #prints the directory
Posted by: Guest on July-06-2021

Code answers related to "know in which directory python script is running"

Python Answers by Framework

Browse Popular Code Answers by Language