A solution without invoking Windows specific APIs will be using pathlib.
from pathlib import Path Path(tempDir).resolve()