Hello,
I'm experimenting with asyncio. I have composed the following code. There
is a server handler and a client handler. I didn't want to split the code
into two files so I just used a socketpair, inspired by example
https://docs.python.org/3/library/asyncio-stream.html#register-an-open-socket-t
On Fri, Jul 3, 2015 at 4:28 AM, Adam Bartoš wrote:
> Hello,
>
> I'm experimenting with asyncio. I have composed the following code. There is
> a server handler and a client handler. I didn't want to split the code into
> two files so I just used a socketpair, inspired by example
> https://docs.pyt
On Fri, Jul 3, 2015 at 8:31 AM, Ian Kelly wrote:
> On Fri, Jul 3, 2015 at 4:28 AM, Adam Bartoš wrote:
>> Hello,
>>
>> I'm experimenting with asyncio. I have composed the following code. There is
>> a server handler and a client handler. I didn't want to split the code into
>> two files so I just
On 2 July 2015 at 18:29, Jason Swails wrote:
>
> As others have suggested, this is almost certainly a 32-bit vs. 64-bit
> issue. Consider the following C program:
>
> // maths.h
> #include
> #include
>
> int main() {
> double x;
> int i;
> x = 1-pow(0.5, 53);
>
> for (i = 1; i <
>> 1) is there a way to close just one direction of the connection?
>
> No. SOCK_STREAM sockets are always bidirectional.
socket.shutdown(socket.SHUT_WR) does the trick.
I think the asyncio.StreamWriter.write_eof() is the high-level
equivalent.
Marko
--
https://mail.python.org/mailman/listinf
On 3-7-2015 7:07, Ned Deily wrote:
> In article <559579bb$0$2921$e4fe5...@news.xs4all.nl>,
> Irmen de Jong wrote:
>> Tested on Mac OSX 10.10.4, with a 64-bit core2duo processor. Below are all
>> 64-bit python
>> implementations:
>> 2.6.9 (apple supplied), 2.7.6 (apple supplied), 3.4.3 (homebrew)
Ian Kelly:
>> 2) In the blocked situaction even KeyboardInterrupt doesn't break the
loop,
>> is that desired behavior? And why?
>
> I don't think so. When I tried this locally (using Python 3.4.0, so
> replacing "async def" with "def" and "await" with "yield from" and
> "loop.create_task" with "as
Adam Bartoš :
> Marko Rauhamaa:
>> socket.shutdown(socket.SHUT_WR) does the trick.
>>
>> I think the asyncio.StreamWriter.write_eof() is the high-level
>> equivalent.
>
> You are right that writer.write_eof() behaves like
> writer.transport.get_extra_info("socket").shutdown(socket.SHUT_WR) –
> the
>> Marko Rauhamaa:
>>> socket.shutdown(socket.SHUT_WR) does the trick.
>>>
>>> I think the asyncio.StreamWriter.write_eof() is the high-level
>>> equivalent.
>>
>> You are right that writer.write_eof() behaves like
>> writer.transport.get_extra_info("socket").shutdown(socket.SHUT_WR) –
>> the serve
On Fri, Jul 3, 2015 at 7:38 PM, Adam Bartoš wrote:
> Ian Kelly:
>
> >> 2) In the blocked situaction even KeyboardInterrupt doesn't break the
> loop,
> >> is that desired behavior? And why?
> >
> > I don't think so. When I tried this locally (using Python 3.4.0, so
> > replacing "async def" with "
On 7/3/2015 4:33 PM, Adam Bartoš wrote:
On Fri, Jul 3, 2015 at 7:38 PM, Adam Bartoš mailto:dre...@gmail.com>> wrote:
Ian Kelly:
>> 2) In the blocked situaction even KeyboardInterrupt doesn't break the
loop,
>> is that desired behavior? And why?
>
> I don't think so. When
Hi,
I'm trying to implement certificate functionality in a python app but after
fighting with pyOpenSSL and M2Crypto I'm thinking about writing wrapper
functions for the OpenSSL command line tool instead or switching the app to
another language all together.
Apparently PyOpenSSL has no way to s
Hi Dennis,
On 07/03/2015 06:11 PM, Dennis Jacobfeuerborn wrote:
> Hi, I'm trying to implement certificate functionality in a python app
> but after fighting with pyOpenSSL and M2Crypto I'm thinking about
> writing wrapper functions for the OpenSSL command line tool instead
> or switching the app t
On Fri, Jul 3, 2015 at 11:13 AM, Oscar Benjamin
wrote:
> On 2 July 2015 at 18:29, Jason Swails wrote:
> >
> > As others have suggested, this is almost certainly a 32-bit vs. 64-bit
> > issue. Consider the following C program:
> >
> > // maths.h
> > #include
> > #include
> >
> > int main() {
>
Hi list, I found a code that calculates entropy of images with
python that can be used for classifying interesting images from
uninteresting ones. Interesting images has more structured patterns
while uninsteresting are more noisy or completely homogeneous.
I was thinking this code (entropy of i
In future releases of Python should ipython Notebooks replace idle as the
default tool for new users to learn python?
This would as I see it have many benefits?
1. A nicer more usual web interface for new users.
2. Would allow the python documentation and tutorials to be distributed as
ipython
On Fri, Jul 3, 2015 at 10:01 PM, Sayth Renshaw
wrote:
> In future releases of Python should ipython Notebooks replace idle as the
> default tool for new users to learn python?
> This would as I see it have many benefits?
>
> 1. A nicer more usual web interface for new users.
> 2. Would allow th
I have never used linux in my life.. only windows based computing.. So I have
problems in installing third party libraries in python.
I know this one is very basic and there are very experienced programmers in
this group.
So can somebody just explain me how many softwares or other python packages
Peter Pearson writes:
> The following code produces a plot with a line running from (9:30, 0) to
> (10:30, 1), not from (8:30, 0) to (9:30, 1) as I desire.
>
> If I use timezone None instead of pacific, the plot is as desired, but
> of course that doesn't solve the general problem of which this i
On 2015-07-04 02:17, telmo bacile wrote:
Hi list, I found a code that calculates entropy of images with
python that can be used for classifying interesting images from
uninteresting ones. Interesting images has more structured patterns
while uninsteresting are more noisy or completely homogeneo
On Fri, Jul 3, 2015 at 9:14 AM, Marko Rauhamaa wrote:
>
>>> 1) is there a way to close just one direction of the connection?
>>
>> No. SOCK_STREAM sockets are always bidirectional.
>
> socket.shutdown(socket.SHUT_WR) does the trick.
>
> I think the asyncio.StreamWriter.write_eof() is the high-leve
>
> On Fri, Jul 3, 2015 at 7:38 PM, Adam Bartoš wrote:
>>
>>> Ian Kelly:
>>>
>> >> 2) In the blocked situaction even KeyboardInterrupt doesn't break the
>>> loop
>>>
>> >> is that desired behavior? And why?
>>>
>> >
>>>
>> > I don't think so. When I tried this locally (using Python 3.4.0, so
>>>
>
22 matches
Mail list logo