Skip to content

asyncio.StreamReader similar behaviour to uart.read() possible? #12996

Discussion options

You must be logged in to vote

sreader.read(2048) will return under two conditions:

  1. If more than 2048 characters have been received it will return with the first 2048.
  2. If fewer characters have been received (including 0) it will return with what it has.

It won't block under any circumstances.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@JohannesNeu
Comment options

@peterhinch
Comment options

@PolarGoose
Comment options

Comment options

You must be logged in to vote
4 replies
@peterhinch
Comment options

Answer selected by JohannesNeu
@JohannesNeu
Comment options

@PolarGoose
Comment options

@peterhinch
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants