On 2010-10-15, MRAB wrote:
>> I wrote an equivalent program in C++ using the win32
>> ReadFile() call, and it read all 255 bytes just fine. What am
>> I doing wrong with the python code?
>>
>>
>> I am using Erlang to launch the Python program as a subprocess. The
>> Erlang fragment that launches
On 15/10/2010 20:28, Dan wrote:
I am writing a Windows program in Python 3.1.2 that reads binary data
from stdin. Whenever it hits a \x1a character, stdin goes EOF and no
more data can be read. A short program that exhibits this problem is:
#listing of main.pyw
import sys
def go():
bb=sys
On Oct 15, 2:42 pm, Neil Cerutti wrote:
> On 2010-10-15, Dan wrote:
>
> > I am writing a Windows program in Python 3.1.2 that reads
> > binary data from stdin. Whenever it hits a \x1a character,
> > stdin goes EOF and no more data can be read. A short program
> > that exhibits this problem is:
On 2010-10-15, Dan wrote:
> I am writing a Windows program in Python 3.1.2 that reads
> binary data from stdin. Whenever it hits a \x1a character,
> stdin goes EOF and no more data can be read. A short program
> that exhibits this problem is:
stdin is not in binary mode. Try invoking with -u op
I am writing a Windows program in Python 3.1.2 that reads binary data
from stdin. Whenever it hits a \x1a character, stdin goes EOF and no
more data can be read. A short program that exhibits this problem is:
#listing of main.pyw
import sys
def go():
bb=sys.stdin.buffer.raw.read(1)
p