<div dir="ltr">Thanks for the improvement! I just simplified the patches to use args.inputfile == '-' which implements exactly what the documentation says. For what it's worth, <span style="font-size:12.8000001907349px">args.inputfile.fileno() ==</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> sys.stdin.fileno() works great too (though with <a href="http://man7.org/linux/man-pages/man2/dup.2.html">http://man7.org/linux/man-pages/man2/dup.2.html</a> I don't know if equality of FD # is guaranteed either), and all three implementations tested fine for a file named '<stdin>'.</span><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 1, 2015 at 11:30 AM, zfec <span dir="ltr"><<a href="mailto:trac@tahoe-lafs.org" target="_blank">trac@tahoe-lafs.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">#14: [patch] Make streaming from stdin / to stdout work.<br>
------------------------------+---------------------------<br>
Reporter: ericpollmann | Owner: zooko<br>
Type: defect | Status: new<br>
Priority: major | Milestone:<br>
Component: component1 | Version:<br>
Resolution: | Keywords: review-needed<br>
Launchpad Bug: |<br>
------------------------------+---------------------------<br>
<br>
</span>Comment (by davidsarah):<br>
<br>
I reviewed [attachment:zfec-1.4.24-streaming-new.patch] (without testing<br>
it) and it looks good, including the tests.<br>
<br>
Review question:<br>
* Is `<a href="http://sys.stdin.name" target="_blank">sys.stdin.name</a>` documented to be `"<stdin>"`, or is that a CPython<br>
standard library implementation detail? Perhaps use<br>
`args.inputfile.fileno() == 0` (or `args.inputfile.fileno() ==<br>
sys.stdin.fileno()` which should be equivalent)?<br>
<br>
--<br>
Ticket URL: <<a href="https://tahoe-lafs.org/trac/zfec/ticket/14#comment:5" target="_blank">https://tahoe-lafs.org/trac/zfec/ticket/14#comment:5</a>><br>
<div class="HOEnZb"><div class="h5">zfec <<a href="https://tahoe-lafs.org/trac/zfec" target="_blank">https://tahoe-lafs.org/trac/zfec</a>><br>
efficient erasure-coding library<br>
</div></div></blockquote></div><br></div>