stripping the first byte from a binary file

Diez B. Roggisch deets at nospam.web.de
Wed Jul 11 15:15:58 CEST 2007


> 
> 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



More information about the Python-list mailing list