A complete solution, here and many other places where a String argument really means bytes, is to accept any PyObject supporting the Buffer API. Then this would work as it does on CPython:
>>> fd = os.open('x.tmp', os.O_CREAT | os.O_RDWR)
>>> a = bytearray("Stuff and nonsense. ")
>>> os.write(fd, a)
20
>>> os.write(fd, buffer(a))
20
>>> os.write(fd, memoryview(a))
20
It would be cool to find some automagic implementation, but I think it has to be a ByteUtil class (or some such), offering few well-crafted static methods, and a re-write of these methods one by one. Asking a buffer for its String is least work but goes completely against the idea of the buffer API as efficient in-place access, unless it's really a PyString after all.