improving performance of writing into a pipe

mikprog at gmail.com mikprog at gmail.com
Tue Feb 19 14:39:59 CET 2013


> 
> def write_to_pipe(line):
> 
>      hexbytes = ''.join('\\x%02x' % ord(c) for c in line)
> 
>      with open('/tmp/mypipe', 'w') as f:
> 
>          f.write(hexbytes)


Update:
with a fix in the pipe THIS was the right way to do it, and it now works.
Thanks a lot Serhiy to you and to everyone else.

Mik




More information about the Python-list mailing list