[issue12197] non-blocking SSL write in Windows sends large data but raises exception

2011-06-09 Thread David Siroky
David Siroky sir...@dasir.cz added the comment: I didn't meant blocking as setblocking(True). I use select/poll but I can't use returned value from send() immediately since in Windows there are often needed more send rounds to actually know how much data was sent. E.g. in Linux I know

[issue12197] non-blocking SSL write in Windows sends large data but raises exception

2011-06-08 Thread David Siroky
David Siroky sir...@dasir.cz added the comment: Sorry, I attached wrong example version. It uses repeated sslsock.write() of the same buffer after catching SSL_ERROR_WANT_WRITE. It delivers the full block but this is a blocking operation. I'm troubled with non-blocking writes. But as I dig

[issue12197] non-blocking SSL write in Windows sends large data but raises exception

2011-05-27 Thread David Siroky
New submission from David Siroky sir...@dasir.cz: Trying to send large bulk of data in MS Windows via non-blocking SSLSocket raises an exception but part of the data is delivered. E.g. ssl_socket.write(ba * 20) raises ssl.SSLError: [Errno 3] _ssl.c:1126: The operation did not complete

Re: unicode speed

2005-11-30 Thread David Siroky
V Tue, 29 Nov 2005 10:14:26 +, Neil Hodgson napsal(a): David Siroky: output = '' I suspect you really want output = u'' here. for c in line: if not unicodedata.combining(c): output += c This is creating as many as 5 new string objects

unicode speed

2005-11-29 Thread David Siroky
Hi! I need to enlighten myself in Python unicode speed and implementation. My platform is AMD [EMAIL PROTECTED] (x86-32), Debian, Python 2.4. First a simple example (and time results): x = a*5000 real0m0.195s user0m0.144s sys 0m0.046s x = ua*5000 real0m2.477s user

Re: pyo contains absolute paths

2005-07-11 Thread David Siroky
V Sat, 09 Jul 2005 10:22:06 -0400, Peter Hansen napsal(a): David Siroky wrote: When I compile my python files with python -OO into pyo files then they still contain absolute paths of the source files which is undesirable for me. How can I deal with that? Don't do that? Delete

Re: pyo contains absolute paths

2005-07-11 Thread David Siroky
V Sat, 09 Jul 2005 11:48:51 -0700, ncf napsal(a): Python is compiling the files with absolute paths because it is much faster to load a file when you know where it is, than to have to find it and then load it. I'm guessing you're wondering this so you can distribute it compiled or such? If

pyo contains absolute paths

2005-07-09 Thread David Siroky
Hi! When I compile my python files with python -OO into pyo files then they still contain absolute paths of the source files which is undesirable for me. How can I deal with that? Thank you. David -- http://mail.python.org/mailman/listinfo/python-list