Question : how to check in which directory python in running
Answered by : happy-hawk
import os
cwd = os.getcwd()
Source : https://stackoverflow.com/questions/5137497/find-current-directory-and-files-directory | Last Update : Mon, 16 Mar 20
Question : os get current directory
Answered by : agreeable-alpaca-egfjy79a1zkc
import os
#Get Current working Directory
currentDirectory = os.getcwd()
#Change the Current working Directory
os.chdir('/home/varun')
Source : https://thispointer.com/python-how-to-get-the-current-working-directory/ | Last Update : Wed, 10 Jun 20
Question : python check for folder
Answered by : jittery-jaguar-14ze7fyho2w2
>>> import os
>>> os.path.isdir('new_folder')
True
Source : https://stackoverflow.com/questions/8933237/how-do-i-check-if-directory-exists-in-python | Last Update : Sat, 04 Jun 22