It's in Python. It just _works_!

Grant Edwards grante at visi.com
Fri Sep 3 17:26:57 CEST 2004


On 2004-09-03, Elbert Lev <elbertlev at hotmail.com> wrote:

>>> Apparently, the file descriptor you get from a socket object
>>> under Win32 can't be used with os.read() and os.write()?  I
>>> couldn't find anywhere in the docs that said so, but I sure
>>> couldn't get it to work.  At least not under WinMe.
>> 
>> Socket handles and file descriptors are disjoint concepts in
>> Windows (any flavor), and aren't interchangeable in any
>> context.
>
> Not exactly. In WIN32 API WriteFile() one can use SOCKET and
> file handle returned by CreateFile(). os.read() uses handles
> returned by open(), which on WIN32 are not the same as
> returned by CreateFile.

That sounds like a bit of mess...

-- 
Grant Edwards                   grante             Yow!  I need to discuss
                                  at               BUY-BACK PROVISIONS
                               visi.com            with at least six studio
                                                   SLEAZEBALLS!!



More information about the Python-list mailing list