<br>It turned out that switching to binary I/O made seek do what he was expecting.  I'm guessing the transparent crlf to lf conversions in windows text I/O get seek() a bit perplexed, because it transparently changes the number of bytes.<br>
<br><div class="gmail_quote">On Mon, Jul 4, 2011 at 4:30 PM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve%2Bcomp.lang.python@pearwood.info">steve+comp.lang.python@pearwood.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">amir chaouki wrote:<br>
<br>
> the problem is when i use the seek function on windows it gives me<br>
> false results<br>
<br>
</div>What do you mean "false results"? What does this even mean?<br>
<br>
Please show us:<br>
<br>
* what you do<br>
* what result you expect<br>
* what result you actually get<br>
<br>
<br>
<br>
--<br>
<font color="#888888">Steven<br>
</font><div><div></div><div class="h5"><br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>