Midfielder James gave his side the lead after 41 minutes after Moses Odubajo had been brought down by Jamie Reckord and sent his spot-kick to the left of the Robins goalkeeper Tyrell Beckford, who was making his league debut.
Six minutes after the interval, leading goalscorer David Mooney was brought down by Troy Archibald-Henville and James stepped up for the resultant penalty again, sending the 19 year-old keeper the wrong way.
Orient had maintained the pressure throughout and the visitors had their teenage keeper to thank for preventing the scoreline from being more emphatic.
Beckford produced a series of saves from Chris Dagnall, Dean Cox , Odubajo and Mooney although on one occasion, he had the post to thank after Dagnall had raced on to Mooney's pass.
Play-off hopefuls Swindon, without a number of first-team players due to suspensions and injuries, offered little going forward.