1244 Re-write update-alternative script for python