An assailant was shot outside the British parliament by armed police, the leader of the House of Commons said on Wednesday.