Add python binding. Fixes bug #457660 (Michael Sheldon).