get program path directory code example Example: get program path directory import os os.path.dirname(os.path.abspath(__file__))