stripping the first byte from a binary file

Alex Popescu the.mindstorm.mailinglist at gmail.com
Wed Jul 11 10:42:28 EDT 2007


On Jul 11, 4:15 pm, "Diez B. Roggisch" <d... at nospam.web.de> wrote:
> > Forgive my newbie ignorance, but I am wondering why the other method
> > would not work? I mean it may not be very safe,
> > but I guess it may perform a lot better, than having to read the whole
> > file just to cut out the first byte.
>
> Because seeking is not moving? Shifting data bytewise isn't something that
> is supported by the underlying OS filesystems, and thus not supported. But
> replacing bytes with others is. Which seek is for.
>
> Diez

As far as I know seek is just about positioning and nothing else.
So, in fact the problem boils down to os support for deleting a bytes.

bests,

./alex
--
.w( the_mindstorm )p.





More information about the Python-list mailing list