[Python-Dev] IO module improvements
Tres Seaver
tseaver at palladion.com
Sat Feb 6 08:31:17 CET 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Antoine Pitrou wrote:
> Pascal Chambon <pythoniks <at> gmail.com> writes:
>> By the way, I'm having trouble with the "name" attribute of raw files,
>> which can be string or integer (confusing), ambiguous if containing a
>> relative path, and which isn't able to handle the new case of my
>> library, i.e opening a file from an existing file handle (which is ALSO
>> an integer, like C file descriptors...)
>
> What is the difference between "file handle" and a regular C file descriptor?
> Is it some Windows-specific thing?
> If so, then perhaps it deserves some Windows-specific attribute ("handle"?).
File descriptors are integer indexes into a process-specific table.
File handles are pointers to opaque structs which contain other
information the kernel knows about the file. MS Windows muddies the
distinction, using "file handle" to refer to the integer index.
[1] http://en.wikipedia.org/wiki/File_handle
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkttGsUACgkQ+gerLs4ltQ733gCgqrkKNryUrWvLLEjoOWL7z5IY
PnkAnREQKkY3CbPikOdEq4sYQcUylKxw
=Sr71
-----END PGP SIGNATURE-----
More information about the Python-Dev
mailing list