Python HORSE program