how to check in which directory python in running
import os cwd = os.getcwd()
Source: stackoverflow.com
python check for folder
>>> import os >>> os.path.isdir('new_folder') True
Source: stackoverflow.com