Trying to chain processes together on a pipeline

Andrew Berg bahamutzero8825 at gmail.com
Tue Jun 28 02:47:00 EDT 2011


On 2011.06.28 01:32 AM, Peter Otten wrote:
> >>> subprocess.call(["ls"], stdout=open(os.devnull, "w"))
> 0
D'oh! Not sure why I was thinking os.devnull was a file object. :-[
> Start with factoring out common code into a good old function.
For some reason I was thinking I would have problems doing that, but
looking at it again, I could probably refactor that into a really nice
function that logs at least all the common Windows error codes that may
arise.

Thanks for pointing those out.



More information about the Python-list mailing list