On-loan Jacob Blyth marked his debut with a goal to set Northampton on course for victory over Newport County.
Blyth's short-range 30th minute header was followed three minutes later by an angled finish by Roy O'Donovan.
Goalkeeper Matt Duke pulled off a series of superb saves, with Chris Zebroski deprived three times.
Newport pressed forward in the second half, but Gary Deegan's scruffy late goal killed them off before Conor Washington's late consolation.
It was a sobering experience for Newport at the end of a remarkable first week back in the Football League fold, which had seen them put four goals past Accrington Stanley and knock Championship Brighton out of the Capital One Cup.
Justin Edinburgh's team enjoyed long periods of pressure but found it difficult to get past the Cobblers' defence - and man-of-the-match Duke in particular.
Northampton, on the other hand, took full advantage when Newport goalkeeper Jamie Stephens hesitated for Flynn's opening goal and again when O'Donovan sprung the visitors' offside trap.
VIEW FROM THE DRESSING ROOM
Northampton Town manager Aidy Boothroyd told BBC Radio Northampton:
"It was a tough game that one. It takes a game like that to let your players know what the Football League is all about.
"They have a lovely summer and they come back and have to hit the ground running.
"I think we gave them two or three opportunities to allow them to get back into it. But overall I think the result was deserved."
Newport County manager Justin Edinburgh told BBC Radio Wales:
"I think the score line was very harsh on us. Anyone who was here today will know we gave a very good account of ourselves and the score line perhaps doesn't reflect the game really.
"We've not been ruthless enough in their box and we're disappointed with the goals we've conceded. But listen, it's a learning curve. If you don't take your chances then you've got to make sure you don't give easy chances away."