This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jsizelove
Recipients georg.brandl, jsizelove
Date 2008-08-08.00:42:34
SpamBayes Score 2.9611536e-08
Marked as misclassified No
Message-id <1218156155.34.0.949676293741.issue3524@psf.upfronthosting.co.za>
In-reply-to
Content
The Input and Output section of the Python 3.0 tutorial
(http://docs.python.org/dev/3.0/tutorial/inputoutput.html) shows an
example of seeking in a negative direction from the end of a file.  I
get an IOError when attempting to run the example in Python 3.0b2 on Mac
OS X 10.4 (PPC).  I don't know whether the tutorial or the code should
be changed.

>>> f = open('workfile', 'r+')
>>> f.write('0123456789abcdef')
16
>>> f.seek(-3, 2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/Users/jimsize/Programming/Python/py3k/3.0b2/lib/python3.0/io.py", line
1609, in seek
    raise IOError("can't do nonzero end-relative seeks")
IOError: can't do nonzero end-relative seeks
History
Date User Action Args
2008-08-08 00:42:35jsizelovesetrecipients: + jsizelove, georg.brandl
2008-08-08 00:42:35jsizelovesetmessageid: <1218156155.34.0.949676293741.issue3524@psf.upfronthosting.co.za>
2008-08-08 00:42:34jsizelovelinkissue3524 messages
2008-08-08 00:42:34jsizelovecreate