Find the current directory and executed file's directory in Python The Problem In a Python script, how can I discover both the directory I executed the script from and the directory in which the script resides?