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 shai
Recipients shai
Date 2013-05-18.16:44:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
At least on posix systems, os.write says it takes a string, but in fact it barfs on strings -- it needs bytes.

$ python
Python 3.3.1 (default, May  6 2013, 16:18:33) 
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> print(os.write.__doc__)
write(fd, string) -> byteswritten

Write a string to a file descriptor.
>>> os.write(1, "hello")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'str' does not support the buffer interface
>>> os.write(1, b"hello")
Date User Action Args
2013-05-18 16:44:29shaisetrecipients: + shai
2013-05-18 16:44:29shaisetmessageid: <>
2013-05-18 16:44:29shailinkissue18009 messages
2013-05-18 16:44:29shaicreate