get current directory from current file python code example Example: working directory python import os cwd = os.getcwd()