Apologies for the link, I didn't read the text properly now spotted the OBSOLETE mark. This is their current recommendation and probably the way I had done it, too.
We have decided to remove this module in future, and instead recommend building your command and invoking it via the subprocess module directly.