File name from file descriptor?

Carlos Ribeiro cribeiro at mail.inet.com.br
Fri Jun 22 08:59:44 EDT 2001


Just for information, on some OS's several file names can point to the same 
file on the disk (on Unix, for instance). In some cases, I that it is 
possible to have a pseudo file without a true name (I think standard input 
is one example, but I'm not sure about the details). Also, fd* 
functionality depend a lot on the OS being used. Could you please tell us 
why do you *need* to make it work using file descriptors?

At 14:03 22/06/01 +0200, Carsten Gaebler wrote:
>Hi there!
>
>How can I determine a file's name if I only have the file descriptor?
>os.fdopen(fd).name just returns '(fdopen)'.
>
>Regards
>Carsten.
>--
>http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list