<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta content="text/html; charset=ISO-8859-1"
<body bgcolor="#ffffff" text="#000000">
On 01/-10/-28163 02:59 PM, amir chaouki wrote:
<pre wrap="">the problem is when i use the seek function on windows it gives me
false results other then the results on *ux. the file that i work with
are very large about 10mb.
If you still care about this problem, you should take some of the
other suggestions to heart; post some code, state what you
expected, and what actually happened, and how they're different.<br>
But my crystal ball says you're trying to do a seek on a text file,
which has restrictions. Once you've called it a text file, you're
telling the system to translate cr/lf pairs into lf, which changes
the apparent size. So seek has no way to reproduce what reading
To quote the docs at <a class="moz-txt-link-freetext" href="http://docs.python.org/library/stdtypes.html">http://docs.python.org/library/stdtypes.html</a>
"If the file is
opened in text mode (without <tt class="docutils literal"><span
class="pre">'b'</span></tt>), only offsets returned by <a
title="file.tell" class="reference internal"
class="xref docutils literal"><span class="pre">tell()</span></tt></a>
legal. Use of other offsets causes undefined behavior."<br>