os.write(fd, str)
Write the bytestring in str to file descriptor fd. Return the number of bytes actually written.
Note
This function is intended for low-level I/O and must be applied to a file descriptor as returned by os.open()
or pipe()
. To write a “file object” returned by the built-in function open()
or by popen()
or fdopen()
, or sys.stdout
or sys.stderr
, use its write()
method.
Changed in version 3.5: If the system call is interrupted and the signal handler does not raise an exception, the function now retries the system call instead of raising an InterruptedError
exception (see PEP 475 for the rationale).
Please login to continue.