为什么我的偏移量不能为负数?
>>> f.tell()
10
>>> f.seek(-5, os.SEEK_CUR)
Traceback (most recent call last):
File "<pyshell#57>", line 1, in <module>
f.seek(-5, os.SEEK_CUR)
io.UnsupportedOperation: can't do nonzero cur-relative seeks
>>> f.tell()
10
>>> f.seek(-5, os.SEEK_CUR)
Traceback (most recent call last):
File "<pyshell#57>", line 1, in <module>
f.seek(-5, os.SEEK_CUR)
io.UnsupportedOperation: can't do nonzero cur-relative seeks
2017-01-18
举报