The Pope's doctor said his life "was in danger" during his five weeks in hospital.