CAMPBELLTON, N.B. -- Two boys killed by a python may have become prey because they had been playing with farm animals, a reptile expert testified Monday.

Bob Johnson, the now-retired former curator of reptiles and amphibians at the Toronto Zoo, told the criminal negligence trial of the python's owner that a snake's keen sense of smell lets it know prey is nearby.

"The smell of food would really excite," he said. "That could be the trigger."

Noah Barthe, 4, and his six-year-old brother Connor had spent Aug. 4, 2013, petting animals and playing at a farm owned by the father of Jean-Claude Savoie before a sleepover in Savoie's apartment. Savoie is on trial on charges of criminal negligence causing death.

Johnson said snakes become more aggressive when they detect possible sources of food -- and an attack would have been unlikely had there been no animal smells on the boys.

"Those boys could have been a stimulant to that snake," he said.

The brothers were killed by Savoie's African rock python after it escaped an enclosure in his apartment by travelling through a ventilation duct and dropping into the living room where they slept. Savoie's own son, sleeping in another room, was unharmed.

A number of witnesses have said it was common to see the cover of the vent on the enclosure's floor.

Defence lawyer Leslie Matchim told the jury in his opening statement Monday that Savoie believed the snake was too big get through the duct, so he didn't see a need to secure the opening.

Savoie, he said, was clearly wrong.

"Being wrong isn't necessarily criminal negligence," Matchim said.

The lawyer reminded the jury of testimony from a volunteer at Savoie's reptile shop downstairs from his apartment: she said Savoie told her that the snake had gotten into the ventilation pipe before, but only made it part way through.

In his testimony, Johnson said any snake enclosures for the Toronto Zoo would have a system of double doors and any openings would be securely caged. The enclosure in Savoie's apartment had a "dryer vent" style of cover for the ventilation duct that was not secured with screws or tape, he said.

Johnson said the enclosure lacked items such as rocks and branches to stimulate the python.

"I would not say that is very conducive to the well-being of the snake," he said.

Last week, a veterinarian who conducted the necropsy on the snake testified it appeared the snake hadn't fed in at least 24 hours.

A pathologist who performed autopsies on the boys said they died of asphyxiation and each were covered in puncture wounds from snake bites.

Johnson said once a snake bites, it is very difficult to unlock that bite, and the large snake could have coiled around both boys at once.

"You do not get away from that anchor bite," he said.

He responded to the earlier testimony of RCMP officers about the python's aggressive behaviour after it was captured -- hissing and lunging at the glass of the enclosure.

"A snake that responds like that is a very aggressive snake," he said.

"It was an extreme response to human presence. This animal was dangerous."

During cross-examination of Johnson, Matchim asked about the testimony of earlier witnesses who described the snake as being much larger in diameter than the ventilation pipe and said they were surprised that the snake could have slithered through it.

Johnson said most people exaggerate the size of snakes they've seen -- often describing them as much larger and longer than they really are.

The court learned last week that measurements during the necropsy put the snake at 3.7 metres long and 10.8 centimetres in diameter at its thickest point.

During cross-examination, Johnson agreed that the dead snake could have measured skinnier when stretched out on the examination table.

Meanwhile, a snake expert from Florida said dead snakes have a diameter that is 10 to 25 per cent smaller than when they are alive.

Eugene Bessette is a snake farmer who owns Ophiological Services in Archer, Florida. He is the only witness being called by the defence.

His company breeds various kinds of snakes, including 7,000 to 8,000 pythons for sale each year.

Bessette testified that after raising large snakes for more than 40 years, he was "in shock and disbelief that a snake that size got through that four-inch hole, but it did."

Outside the court, defence lawyer Mikael Bernard said Bessette's comments go to the merits of whether a reasonable person believed the snake could escape.

The Crown will be able to cross-examine Bessette Tuesday morning.