I quite like a routine for weighted least squares in scipy. In fact, the lack of a module to calculate the confidence intervals for least square fits (for the mean values and for the predictions) has made me write my own routine (fit_line in thLib in pipy).