Re: compile python 3.3 with bz2 support

2014-10-05 Thread ignat99
sudo apt-get install libbz2-dev Python-3.4.1$ ./configure --with-pydebug --with-bz2 --prefix=/usr && make -j2 On Saturday, 22 December 2012 17:06:51 UTC+1, Benjamin Kaplan wrote: > On Dec 21, 2012 1:31 AM, "Isml" <7606...@qq.com> wrote: > > > > > > hi, everyone: > > >     I want to compile py

Re: Practice question

2014-10-05 Thread Rustom Mody
On Monday, October 6, 2014 5:04:11 AM UTC+5:30, Skip Montanaro wrote: > On Oct 5, 2014 6:07 PM, Seymore4Head wrote: > > For the record, I don't want a hint.  I want the answer. > > I see a practice question is similar to this. > > 15 <= x < 30  And it wants a similar expression that is equivalent.

Re: Timezones

2014-10-05 Thread Chris Angelico
On Mon, Oct 6, 2014 at 1:37 PM, Rustom Mody wrote: >> My advice is to avoid time zones, they're a real pain, seriously. > > What say we send an application to the UN to declare the world flat? Easier to simply start scheduling things in UTC. I run an international Dungeons & Dragons campaign with

Re: Timezones

2014-10-05 Thread Rustom Mody
On Monday, October 6, 2014 3:45:44 AM UTC+5:30, Mark Lawrence wrote: > On 05/10/2014 22:17, Seymore4Head wrote: > > This is not a new video, but it is new to me. > > https://www.youtube.com/watch?v=-5wpm-gesOY > > Any links to some easy to follow time zone math? > My advice is to avoid time zones,

Re: Practice question

2014-10-05 Thread Ned Batchelder
On 10/5/14 8:07 PM, Seymore4Head wrote: On Sun, 05 Oct 2014 19:14:27 -0400, Ned Batchelder wrote: On 10/5/14 7:02 PM, Seymore4Head wrote: For the record, I don't want a hint. I want the answer. I see a practice question is similar to this. 15 <= x < 30 And it wants a similar expression that

Re: Timezones

2014-10-05 Thread Akira Li
Seymore4Head writes: > This is not a new video, but it is new to me. > https://www.youtube.com/watch?v=-5wpm-gesOY > > Any links to some easy to follow time zone math? The point of the video is that you should not do it yourself, use already written tools. It is quite comprehensive video. Here'

Re: Practice question

2014-10-05 Thread Seymore4Head
On Sun, 05 Oct 2014 19:47:40 -0400, Terry Reedy wrote: >On 10/5/2014 7:02 PM, Seymore4Head wrote: >> For the record, I don't want a hint. I want the answer. >> I see a practice question is similar to this. >> 15 <= x < 30 And it wants a similar expression that is equivalent. >> So the right ans

Re: Practice question

2014-10-05 Thread Seymore4Head
On Sun, 05 Oct 2014 19:14:27 -0400, Ned Batchelder wrote: >On 10/5/14 7:02 PM, Seymore4Head wrote: >> For the record, I don't want a hint. I want the answer. >> I see a practice question is similar to this. >> 15 <= x < 30 And it wants a similar expression that is equivalent. >> So the right an

Re: Practice question

2014-10-05 Thread Terry Reedy
On 10/5/2014 7:02 PM, Seymore4Head wrote: For the record, I don't want a hint. I want the answer. I see a practice question is similar to this. 15 <= x < 30 And it wants a similar expression that is equivalent. So the right answer is 15<= x or x <30 but one of the other answers is not (15<= x a

Re: Practice question

2014-10-05 Thread Skip Montanaro
On Oct 5, 2014 6:07 PM, "Seymore4Head" wrote: > > For the record, I don't want a hint. I want the answer. > I see a practice question is similar to this. > 15 <= x < 30 And it wants a similar expression that is equivalent. Maybe 30 > x >= 15 ? Seems more "similar" to the original expressi

Re: Practice question

2014-10-05 Thread Ned Batchelder
On 10/5/14 7:02 PM, Seymore4Head wrote: For the record, I don't want a hint. I want the answer. I see a practice question is similar to this. 15 <= x < 30 And it wants a similar expression that is equivalent. So the right answer is 15<= x or x <30 No, "15 <= x < 30" is equivalent to "15 <= x

Re: Practice question

2014-10-05 Thread Roy Smith
In article , Seymore4Head wrote: > For the record, I don't want a hint. I want the answer. 42. -- https://mail.python.org/mailman/listinfo/python-list

Practice question

2014-10-05 Thread Seymore4Head
For the record, I don't want a hint. I want the answer. I see a practice question is similar to this. 15 <= x < 30 And it wants a similar expression that is equivalent. So the right answer is 15<= x or x <30 but one of the other answers is not (15<= x and x <30) But it says.remember you can

Re: Timezones

2014-10-05 Thread Mark Lawrence
On 05/10/2014 22:17, Seymore4Head wrote: This is not a new video, but it is new to me. https://www.youtube.com/watch?v=-5wpm-gesOY Any links to some easy to follow time zone math? My advice is to avoid time zones, they're a real pain, seriously. -- My fellow Pythonistas, ask not what our lan

Timezones

2014-10-05 Thread Seymore4Head
This is not a new video, but it is new to me. https://www.youtube.com/watch?v=-5wpm-gesOY Any links to some easy to follow time zone math? -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-10-05 Thread Ned Deily
In article , Christian Gollwitzer wrote: [... much good stuff deleted ... ] > wish is a type A program, it creates an interpreter and therefore must > link to the actual library. So is Tkinter. But Tkagg is not, it extends > a preexisting interpreter. Thanks, Christian. That's a good summary,

Re: re search through a text Vs line

2014-10-05 Thread Dave Angel
Shiva Wrote in message: > OK, > Hi Dave, > > I modified it as below and it works(If there is a way to make this more > efficient please let me know) > Deends on what you mean by efficiency. The big memory efficiency gain was when you got rid of either the read or readlines. Performance

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-10-05 Thread Christian Gollwitzer
Am 04.10.14 07:53, schrieb Ned Deily: In article , Kevin Walzer wrote: A Tcl library compiled for 8.5 can be loaded into 8.6 with no re-compiling required because of stubs. It has nothing to do with Python per se; that's just the way linking with OS frameworks work. > [...] When Python

Re: "High water" Memory fragmentation still a thing?

2014-10-05 Thread mm0fmf
On 04/10/2014 02:02, Steven D'Aprano wrote: Way back in the mid 1980s, Apple Macintoshes used a memory manager which could move memory around. But the memory manager didn't return a pointer to memory the way malloc does. It returned a pointer to the pointer and you had to double dereference i

Re: re search through a text Vs line

2014-10-05 Thread Shiva
OK, Hi Dave, I modified it as below and it works(If there is a way to make this more efficient please let me know) By the way I am using Python 3.4 import sys import re def extract_names(filename): path = '/home/LearnPython/exercises/' fullfilename = path+filename print('fullfilenam

Re:re search through a text Vs line

2014-10-05 Thread Dave Angel
Shiva Wrote in message: > Hi, > > I am doing a regular expression search for a year through a file. > I think you are being confused in part by your choice of names. Let's go through and describe the variable contents. > fileextract = open(fullfilename,'r') > line = fileextract.read() 'l

Re: How donwnload youtube videos?

2014-10-05 Thread Steven D'Aprano
Dymond Simon wrote: > Hi guys .. > > Uhm, ı have to download youtube videos ı was tried urlretrive but doesn't > work ı have no idea that's why.So there is my question, "we cant donwload > youtube videos directly ? ". "Doesn't work". Could you be more specific? Although some of us are very smart

re search through a text Vs line

2014-10-05 Thread Shiva
Hi, I am doing a regular expression search for a year through a file. fileextract = open(fullfilename,'r') line = fileextract.read() texts = re.search(r'1\d\d\d', line) print(texts.group()) The above works. However if I do: fileextract = open(fullfilename,'r') line = fileextra

Re: Issue in printing top 20 dictionary items by dictionary value

2014-10-05 Thread Shiva
Larry Hudson yahoo.com.dmarc.invalid> writes: > > On 10/04/2014 10:36 AM, Shiva wrote: > > > > What I don't understand is: > > > > for w in eachword: > > textstorage[w]=textstorage.get(w, 0) + 1 > > > > How does textstorage.get(w,0)+1 give the count of the word?? > > > > Very long