Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68526

RE: Controlling buffer alignment in file.read()

From "Haralanov, Mitko" <mitko.haralanov@intel.com>
Subject RE: Controlling buffer alignment in file.read()
Date 2014-03-18 23:13 +0000
References <mailman.8260.1395174272.18130.python-list@python.org> <bos1vgF8r6oU1@mid.individual.net>
Newsgroups comp.lang.python
Message-ID <mailman.8265.1395184430.18130.python-list@python.org> (permalink)

Show all headers | View raw


> For control at that level you'd be better off using
> direct system calls, i.e. os.open() and os.read(),
> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Controlling buffer alignment in file.read() "Haralanov, Mitko" <mitko.haralanov@intel.com> - 2014-03-18 20:23 +0000
  Re: Controlling buffer alignment in file.read() Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-03-19 12:08 +1300
    RE: Controlling buffer alignment in file.read() "Haralanov, Mitko" <mitko.haralanov@intel.com> - 2014-03-18 23:13 +0000
      Re: Controlling buffer alignment in file.read() Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-03-19 13:07 +1300
      RE: Controlling buffer alignment in file.read() Laurent Pointal <laurent.pointal@free.fr> - 2014-03-22 19:28 +0100

csiph-web