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


Groups > comp.lang.python > #68526

RE: Controlling buffer alignment in file.read()

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <mitko.haralanov@intel.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.025
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'read.': 0.03; 'alignment': 0.07; 'subject:()': 0.09; 'python': 0.11; 'thanks,': 0.17; 'working.': 0.19; 'seems': 0.21; 'to:name:python-list@python.org': 0.22; 'bytes': 0.24; 'controlling': 0.24; 'certain': 0.27; 'header :In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'that.': 0.31; 'allows': 0.31; 'received:169.254': 0.32; 'problem': 0.35; 'i.e.': 0.36; 'charset:us-ascii': 0.36; 'received:169': 0.37; 'level': 0.37; 'received:10': 0.37; 'to:addr:python-list': 0.38; 'issue': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; 'direct': 0.67; 'calls,': 0.84
X-ExtLoop1 1
X-IronPort-AV E=Sophos;i="4.97,681,1389772800"; d="scan'208";a="501559693"
From "Haralanov, Mitko" <mitko.haralanov@intel.com>
To Gregory Ewing <greg.ewing@canterbury.ac.nz>, "python-list@python.org" <python-list@python.org>
Subject RE: Controlling buffer alignment in file.read()
Thread-Topic Controlling buffer alignment in file.read()
Thread-Index AQHPQv75EIEp9ebFTROzTNrUEcEfy5rnePNw
Date Tue, 18 Mar 2014 23:13:46 +0000
References <mailman.8260.1395174272.18130.python-list@python.org> <bos1vgF8r6oU1@mid.individual.net>
In-Reply-To <bos1vgF8r6oU1@mid.individual.net>
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
x-originating-ip [10.1.200.107]
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8265.1395184430.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1395184430 news.xs4all.nl 2967 [2001:888:2000:d::a6]:59082
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:68526

Show key headers only | 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