#2768: add a note on how to get a file descriptor.
This commit is contained in:
parent
304b10ef22
commit
49b9192b12
|
@ -513,6 +513,10 @@ process will then be assigned 3, 4, 5, and so forth. The name "file descriptor"
|
||||||
is slightly deceptive; on Unix platforms, sockets and pipes are also referenced
|
is slightly deceptive; on Unix platforms, sockets and pipes are also referenced
|
||||||
by file descriptors.
|
by file descriptors.
|
||||||
|
|
||||||
|
The :meth:`~file.fileno` method can be used to obtain the file descriptor
|
||||||
|
associated with a file object when required. Note that using the file
|
||||||
|
descriptor directly will bypass the file object methods, ignoring aspects such
|
||||||
|
as internal buffering of data.
|
||||||
|
|
||||||
.. function:: close(fd)
|
.. function:: close(fd)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue