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 serhiy.storchaka
Recipients erik.bray, serhiy.storchaka, xtreak
Date 2018-10-05.11:51:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538740298.57.0.545547206417.issue34904@psf.upfronthosting.co.za>
In-reply-to
Content
This may be a Linux bug. The /dev/null file is seekable, but seek() doesn't work correctly for it. It is especially confusing for buffered files. seek() always returns 0 and reset the file position.

>>> f = open('/dev/null', 'wb')
>>> f.seekable()
True
>>> f.tell()
0
>>> f.write(b'abcdefgh')
8
>>> f.tell()
8
>>> f.seek(8)
0
>>> f.tell()
0

In contrary, files like /dev/stdout are not seekable, and writing a ZIP file to them works properly.
History
Date User Action Args
2018-10-05 11:51:38serhiy.storchakasetrecipients: + serhiy.storchaka, erik.bray, xtreak
2018-10-05 11:51:38serhiy.storchakasetmessageid: <1538740298.57.0.545547206417.issue34904@psf.upfronthosting.co.za>
2018-10-05 11:51:38serhiy.storchakalinkissue34904 messages
2018-10-05 11:51:38serhiy.storchakacreate