7 ms·
As someone who to this day still cringes every time they need to work with the subprocess module, do yourself a favor and use Kenneth Reitz's excellent wrapper
by Pewpewarrows 14y ago
As someone who to this day still cringes every time they need to work with the subprocess module, do yourself a favor and use Kenneth Reitz's excellent wrapper library called Envoy:
https://github.com/kennethreitz/envoy https://github.com/kennethreitz/envoy
For reference, he's the same guy that did the Requests module, which is pretty much the defacto standard for avoiding urllib hell.
- shuzchen 14y agoAs someone who has used (and contributed code) to envoy, I must give warning that envoy is still very much a work in progress. Don't go in there expecting the same quality of the Requests module.
- falcolas 14y agoEnvoy doesn't work if your data is larger than what you can safely store in memory (a few times over). I would guess that subprocess is so ugly just because it needs to be so flexible. Personally, I don't find it so offensive, mostly because I have to take advantage of its "warts" on almost a daily basis.