Python Dialog Return Value Optimization In C