How to get the current working directory
import os cwd = os.path.dirname(os.path.realpath(__file__)) print(cwd)