Added python history saving