Message189535
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")
hello5
>>> |
|
Date |
User |
Action |
Args |
2013-05-18 16:44:29 | shai | set | recipients:
+ shai |
2013-05-18 16:44:29 | shai | set | messageid: <1368895469.2.0.802658153503.issue18009@psf.upfronthosting.co.za> |
2013-05-18 16:44:29 | shai | link | issue18009 messages |
2013-05-18 16:44:29 | shai | create | |
|