On 01/23/2017 09:00 AM, Grant Edwards wrote:
On 2017-01-23, Antoon Pardon wrote:
The standard response to issues like this is:
A foolish consistency is the hobgoblin of little minds
And wise consistency is the foundation of a good language design.
Otherwise known as: if there's not a
On 2017-01-23, Antoon Pardon wrote:
> Op 22-01-17 om 01:52 schreef Grant Edwards:
>> Newsgroups: gmane.comp.python.general
>> From: Grant Edwards
>> Subject: Re: How to create a socket.socket() object from a socket fd?
>> References:
>>
>>
>> Fol
Op 22-01-17 om 01:52 schreef Grant Edwards:
> Newsgroups: gmane.comp.python.general
> From: Grant Edwards
> Subject: Re: How to create a socket.socket() object from a socket fd?
> References:
>
>
> Followup-To:
>
>
>
> I'm still baffled why the sta
On 2017-01-22 01:03, Grant Edwards wrote:
> On 2017-01-21, Christian Heimes wrote:
>
>> You might be interested in my small module
>> https://pypi.python.org/pypi/socketfromfd/ . I just releases a new
>> version with a fix for Python 2. Thanks for the hint! :)
>>
>> The module correctly detects a
Newsgroups: gmane.comp.python.general
From: Grant Edwards
Subject: Re: How to create a socket.socket() object from a socket fd?
References:
Followup-To:
I'm still baffled why the standard library fromfd() code dup()s the
descriptor.
According to the comment in the CPython sources
On 2017-01-21, Christian Heimes wrote:
> You might be interested in my small module
> https://pypi.python.org/pypi/socketfromfd/ . I just releases a new
> version with a fix for Python 2. Thanks for the hint! :)
>
> The module correctly detects address family, socket type and proto from
> a fd. I
On 2017-01-21, Chris Angelico wrote:
> On Sun, Jan 22, 2017 at 9:41 AM, Grant Edwards
> wrote:
>> | __init__(self, family=2, type=1, proto=0, _sock=None)
>> |
>>
>> Ah! There's a keyword argument that doesn't appear in the docs, so
>> let's try that...
>
> That's marginally better than my monke
Grant Edwards wrote:
> Given a Unix file discriptor for an open TCP socket, I can't figure
> out how to create a python 2.7 socket object like those returned by
> socket.socket()
>
> Based on the docs, one might think that socket.fromfd() would do that
> (since the docs say that's what it does):
On 2017-01-21 23:41, Grant Edwards wrote:
> On 2017-01-21, Grant Edwards wrote:
>
>> Given a Unix file discriptor for an open TCP socket, I can't figure
>> out how to create a python 2.7 socket object like those returned by
>> socket.socket()
>>
>> Based on the docs, one might think that socket.f
On Sun, Jan 22, 2017 at 9:41 AM, Grant Edwards
wrote:
> | __init__(self, family=2, type=1, proto=0, _sock=None)
> |
>
> Ah! There's a keyword argument that doesn't appear in the docs, so
> let's try that...
That's marginally better than my monkeypatch-after-creation
suggestion, but still broad
On 2017-01-21, Grant Edwards wrote:
> Given a Unix file discriptor for an open TCP socket, I can't figure
> out how to create a python 2.7 socket object like those returned by
> socket.socket()
>
> Based on the docs, one might think that socket.fromfd() would do that
> (since the docs say that's
On Sun, Jan 22, 2017 at 9:28 AM, Grant Edwards
wrote:
> Given a Unix file discriptor for an open TCP socket, I can't figure
> out how to create a python 2.7 socket object like those returned by
> socket.socket()
I suspect you can't easily do it. In more recent Pythons, you can
socket.socket(filen
Given a Unix file discriptor for an open TCP socket, I can't figure
out how to create a python 2.7 socket object like those returned by
socket.socket()
Based on the docs, one might think that socket.fromfd() would do that
(since the docs say that's what it does):
Quoting https://docs.python.org/
13 matches
Mail list logo