Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Chris Angelico
On Wed, Mar 11, 2015 at 12:42 PM, Cameron Simpson wrote: > On 10Mar2015 23:27, Chris Angelico wrote: >> >> Ah, sure. Especially the bit about the cache :) Though I usually find >> that download times on https vs http aren't all that different; it >> takes a little bit longer to establish the conn

Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Cameron Simpson
On 11Mar2015 06:50, Ben Finney wrote: Miki Tebeka writes: Thanks Chris, I was hitting the wrong URL by mistake. Didn't think an extra / will make all that difference :) It is quite astonishing, I agree. I'd even call it a bug worth reporting; those two should be the same otherwise people are

Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Cameron Simpson
On 10Mar2015 23:27, Chris Angelico wrote: Ah, sure. Especially the bit about the cache :) Though I usually find that download times on https vs http aren't all that different; it takes a little bit longer to establish the connection, but less than the variation in DNS timing. Most of the time, t

Re: Python3: Reading a text/binary mixed file

2015-03-10 Thread Cameron Simpson
On 10Mar2015 22:38, Paulo da Silva wrote: On 10-03-2015 04:14, Cameron Simpson wrote: On 10Mar2015 04:01, Paulo da Silva wrote: But this is very tricky! I am on linux, but if I ran this program on windows I needed to change it to "eat" also the '\r'. If you're in Python 3 (recommended!) and

Re: Python3: Reading a text/binary mixed file

2015-03-10 Thread Paulo da Silva
On 10-03-2015 05:56, Steven D'Aprano wrote: ... Thank you very much for your post. I learned what I'm needing from it! Exactly what I was looking for. Thank you. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3: Reading a text/binary mixed file

2015-03-10 Thread Paulo da Silva
On 10-03-2015 12:41, random...@fastmail.us wrote: > On Tue, Mar 10, 2015, at 00:01, Paulo da Silva wrote: >> For .pnm photo files I read the entire file (I needed it in memory >> anyway), splited a copy separated by b'\n', got the headers stuff and >> then used the original remaining bytes as the p

Re: Python3: Reading a text/binary mixed file

2015-03-10 Thread Paulo da Silva
On 10-03-2015 04:14, Cameron Simpson wrote: > On 10Mar2015 04:01, Paulo da Silva wrote: >> On 10-03-2015 00:55, Dave Angel wrote: ... >> For .pnm photo files I read the entire file (I needed it in memory >> anyway), splited a copy separated by b'\n', got the headers stuff and >> then used the orig

Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Ben Finney
Miki Tebeka writes: > Thanks Chris, I was hitting the wrong URL by mistake. > Didn't think an extra / will make all that difference :) It is quite astonishing, I agree. I'd even call it a bug worth reporting; those two should be the same otherwise people are going to get quite confused. -- \

EuroPython 2015: Announcing standard ticket prices

2015-03-10 Thread M.-A. Lemburg
Last week has been very busy. We’ve launched the website, started the early-bird ticket sales and handled the first round of attendee questions with our brand new help desk system (based on django-helpdesk). At the same time, we have been finalizing the budget for the conference, which now allows

Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Chris Angelico
On Tue, Mar 10, 2015 at 11:24 PM, Joseph Wayodi wrote: > Does it make sense that and > are completely different pages? The > only difference in URLs being the slash at the end. Technically it's perfectly legal, of course, but wow, tha

Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Miki Tebeka
Thanks Chris, I was hitting the wrong URL by mistake. Didn't think an extra / will make all that difference :) On Tuesday, March 10, 2015 at 2:12:13 PM UTC+2, Chris Angelico wrote: > On Tue, Mar 10, 2015 at 10:55 PM, Steven D'Aprano > wrote: > > Miki Tebeka wrote: > > > >> Greetings, > >> > >>

Re: Python3: Reading a text/binary mixed file

2015-03-10 Thread random832
On Tue, Mar 10, 2015, at 00:01, Paulo da Silva wrote: > For .pnm photo files I read the entire file (I needed it in memory > anyway), splited a copy separated by b'\n', got the headers stuff and > then used the original remaining bytes as the photo pixels. > But this is very tricky! I am on linux,

Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Chris Angelico
On Tue, Mar 10, 2015 at 11:16 PM, Steven D'Aprano wrote: > Chris Angelico wrote: > > [...] >>> You're downloading via https, which has more overhead than http. There's >>> a certificate that needs to be checked, the content can't be cached, and >>> there's the cost of encryption. >> >> Those costs

Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Joseph Wayodi
On Tue, Mar 10, 2015 at 3:11 PM, Chris Angelico wrote: > > Oh wait. What I was remembering was https://pypi.python.org/ without > the extra pathing on it. And yes, that page _is_ short and fast. So > that's an appropriate landing page. > > To the OP: You're downloading the entire list of packages,

Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Steven D'Aprano
Chris Angelico wrote: [...] >> You're downloading via https, which has more overhead than http. There's >> a certificate that needs to be checked, the content can't be cached, and >> there's the cost of encryption. > > Those costs don't factor in here; the content-length is what the > server anno

Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Chris Angelico
On Tue, Mar 10, 2015 at 10:55 PM, Steven D'Aprano wrote: > Miki Tebeka wrote: > >> Greetings, >> >> $ time curl -I https://pypi.python.org/pypi/ >> HTTP/1.1 200 OK >> Date: Tue, 10 Mar 2015 10:24:30 GMT >> ... >> Content-Length: 9870689 >> curl -I https://pypi.python.org/py

Re: Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Steven D'Aprano
Miki Tebeka wrote: > Greetings, > > $ time curl -I https://pypi.python.org/pypi/ > HTTP/1.1 200 OK > Date: Tue, 10 Mar 2015 10:24:30 GMT > ... > Content-Length: 9870689 > curl -I https://pypi.python.org/pypi/ 0.02s user 0.00s system 2% cpu > 12.271 total $ > > Note t

Did https://pypi.python.org/pypi/ became huge and slow?

2015-03-10 Thread Miki Tebeka
Greetings, $ time curl -I https://pypi.python.org/pypi/ HTTP/1.1 200 OK Date: Tue, 10 Mar 2015 10:24:30 GMT ... Content-Length: 9870689 curl -I https://pypi.python.org/pypi/ 0.02s user 0.00s system 2% cpu 12.271 total $ Note the long time (for comparison hitting pyth

Re: Letter class in re

2015-03-10 Thread Albert-Jan Roskam
On Tue, 3/10/15, Antoon Pardon wrote: Subject: Re: Letter class in re To: python-list@python.org Date: Tuesday, March 10, 2015, 9:35 AM Op 09-03-15 om 17:11 schreef Steven D'Aprano: > Antoon Pardon wrote: > >> I am using PLY for a parsing task which uses re for the lexical >> analys

Re: Letter class in re

2015-03-10 Thread Antoon Pardon
Op 09-03-15 om 17:11 schreef Steven D'Aprano: > Antoon Pardon wrote: > >> I am using PLY for a parsing task which uses re for the lexical >> analysis. Does anyone >> know what regular expression to use for a sequence of letters? There is >> a class for alphanumerics but I can't find one for just le

Re: Letter class in re

2015-03-10 Thread Antoon Pardon
Op 09-03-15 om 16:17 schreef Tim Chase: > On 2015-03-09 15:29, Antoon Pardon wrote: >> Op 09-03-15 om 13:50 schreef Tim Chase: (?:(?!_|\d)\w)\w+ >>> If you don't have to treat it as an atom, you can simplify that to >>> just >>> >>> (?!_|\d)\w+ >>> >>> which just means that the first chara