where i am python code example Example: get directory of file python Click to copyimport os dir_path = os.path.dirname(os.path.realpath(__file__))