[Python-checkins] r79580 - python/trunk/Doc/library/os.rst

georg.brandl python-checkins at python.org
Fri Apr 2 10:39:09 CEST 2010


Author: georg.brandl
Date: Fri Apr  2 10:39:09 2010
New Revision: 79580

Log:
#2768: add a note on how to get a file descriptor.

Modified:
   python/trunk/Doc/library/os.rst

Modified: python/trunk/Doc/library/os.rst
==============================================================================
--- python/trunk/Doc/library/os.rst	(original)
+++ python/trunk/Doc/library/os.rst	Fri Apr  2 10:39:09 2010
@@ -513,6 +513,10 @@
 is slightly deceptive; on Unix platforms, sockets and pipes are also referenced
 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)
 


More information about the Python-checkins mailing list