Controlling buffer alignment in

Laurent Pointal laurent.pointal at
Sat Mar 22 19:28:35 CET 2014

Haralanov, Mitko wrote:

>> For control at that level you'd be better off using
>> direct system calls, i.e. and,
>> then you can read exacty the number of bytes you want.
> The problem is not controlling the number of bytes read. That part seems
> to be working. The issue is that the buffer into which the data is placed
> needs to be of certain alignment (8byte-aligned). Python does not seem to
> have a way that allows me to control that.
> Thanks,
> - Mitko

Did you try to set buffering parameter to 0 (unbuffered) ?

Eventually going to which map tp low level (eventually followed by 
an os.fdopen())


More information about the Python-list mailing list