title: fd.seek() IOError: [Errno 22] Invalid argument
body: <p>My Python Interpreter (v2.6.5) raises the above error in the following codepart:</p>
  
  <pre><code>fd = open("some_filename", "r")
  fd.seek(-2, os.SEEK_END) #same happens if you exchange the second arg. w/ 2
  data=fd.read(2);
  </code></pre>
  
  <p>last call is fd.seek()</p>
  
  <pre><code>Traceback (most recent call last):
      File "bot.py", line 250, in &lt;module&gt;
          fd.seek(iterator, os.SEEK_END);
  IOError: [Errno 22] Invalid argument
  </code></pre>
  
  <p>The strange thing with this is that the exception occurs just when executing my entire code, not if only the specific part with the file opening.
  At the runtime of this part of code, the opened file definitely exists, disk is not full, the variable "iterator" contains a correct value like in the first codeblock.
  What could be my mistake?</p>
  
  <p>Thanks in advance</p>