Skip to content

Comments

Maybe solved that windows specific problem#420

Closed
bofm wants to merge 1 commit intowuub:masterfrom
bofm:patch-1
Closed

Maybe solved that windows specific problem#420
bofm wants to merge 1 commit intowuub:masterfrom
bofm:patch-1

Conversation

@bofm
Copy link

@bofm bofm commented May 1, 2015

A possible solution for the problem:
"this is windows specific problem, that you cannot tell if there are more bytes ready, so we read only 1 at a times"

How it works:
read1(n) method allows us to read up to n bytes.

io.open(<popen_object>.stdout.fileno(), 'rb', closefd=False) as out:
    bytes = out.read1(4096)

A possible solution for the problem:
"this is windows specific problem, that you cannot tell if there are more bytes ready, so we read only 1 at a times"
@bofm
Copy link
Author

bofm commented May 1, 2015

Works fine on ST3/Windows 8.1. Noticeably faster than 1 byte at a time.

@gacelita
Copy link
Collaborator

Going with #307 on this one.

@gacelita gacelita closed this Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants