On 11 November 2016 at 06:02, Jiajie Hu <[email protected]> wrote:

> +    reader = codecs.getreader('utf-8')(process.stdout)
>      buf = ''
>      while True:
> -        out = process.stdout.read(1)
> -        out = out.decode('utf-8')
> +        out = reader.read(1, 1)
>

A reader is definitely the right thing here, but I'm wondering why this
needs to loop on single characters.  As I understand it doing a read() on a
reader wrapping stdout will read until it blocks (because the process
hasn't got anything to output) so result in less pointless iterating.

Ross
-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to