Re: Why chunks is not part of the python standard lib?

2013-05-01 Thread Steven D'Aprano
On Wed, 01 May 2013 10:00:04 +0100, Oscar Benjamin wrote: > On 1 May 2013 08:10, Mark Lawrence wrote: >> On 01/05/2013 07:26, Ricardo Azpeitia Pimentel wrote: >>> >>> After reading How do you split a list into evenly sized chunks in >>> Python? >>> >>>

Re: how to get next month string?

2013-05-01 Thread holdenweb
Hello. Is that you? Wondered what you had been up to lately and discovered that your email address hadn't transferred across to my new computer, so I had to resort to Google and found you on camp.lang.python - I hope! regards Steve On Tuesday, July 24, 2007 4:56:56 AM UTC-7, BartlebyScrivener

Re: Red Black Tree implementation?

2013-05-01 Thread duncan smith
On 02/05/13 00:11, Dan Stromberg wrote: What's the best Red Black Tree implementation for Python with an opensource license? I started out looking at http://newcenturycomputers.net/projects/rbtree.html because it was pretty high in Google and had the operators I wanted, but it gets very slow at

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-05-01 Thread alex23
On May 2, 6:32 am, Mark Janssen wrote: > > You seem to want to squeeze all of computer science and programming into a > > tidy hierarchy.  It won't work, it's not tidy. I strongly suggest you read > > more about computer science before forming more opinions.  You have a lot to > > learn ahead of y

Failure to build Python 3.3.2 SSL Module

2013-05-01 Thread George T
Anyone have any thoughts on building Python 3.3.2 with the SSL module? I'm on RedHat Enterprise 6.4 and used Yum to install the openssl and openssl-devel 1.0.1e packages. But I keep getting a failure to build the SSL module - even if I set CFLAGS and LDFLAGS to find the headers and libs or addit

Re: How do I encode and decode this data to write to a file?

2013-05-01 Thread Ned Batchelder
On 4/29/2013 5:47 AM, c...@isbd.net wrote: If I understand correctly the encode() is saying that it can't understand the data in the html because there's a character 0xc3 in it. I *think* this means that the é is encoded in UTF-8 already in the incoming data stream (should be as my system is who

Re: in need of some help...

2013-05-01 Thread Alex Norton
Thank you very much for the specific detail. I have already done the signal for the finish button so that the app closes when clicked -- http://mail.python.org/mailman/listinfo/python-list

Red Black Tree implementation?

2013-05-01 Thread Dan Stromberg
What's the best Red Black Tree implementation for Python with an opensource license? I started out looking at http://newcenturycomputers.net/projects/rbtree.htmlbecause it was pretty high in Google and had the operators I wanted, but it gets very slow at about half a million elements. I've been d

Re: How do I encode and decode this data to write to a file?

2013-05-01 Thread Ned Batchelder
On 5/1/2013 5:20 PM, Tony the Tiger wrote: On Mon, 29 Apr 2013 10:47:46 +0100, cl wrote: raw = os.path.join(directory, self.getNameNoExtension()) + ".html" file = open(raw, "w") file.write("".join(html).encode('utf-8')) file.close() This works for

Re: "python.exe has stopped working" when os.execl() runs on Windows 7

2013-05-01 Thread Fábio Santos
Reproduced in Windows 7 Ultimate: >>> import os >>> os.execl('ping.exe', '') At this point the REPL freezes, and windows prompts me to close Python since it stopped responding. -- Fábio Santos -- http://mail.python.org/mailman/listinfo/python-list

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-05-01 Thread Mark Janssen
>> Here's a simple rule to resolve the ambiguity. Whoever publishes >> first, gets to claim origin of a word and its usage, kind of like a >> BDFL. The rest can adapt around that, make up their own word, or be >> corrected as the community requires. > > You seem to want to squeeze all of compute

Re: to a human - about 2to3

2013-05-01 Thread Terry Jan Reedy
On 5/1/2013 10:52 AM, Jennifer Butler wrote: I will start teaching Python to my pupils shortly. I have been looking for materials and have gathered a collection of programs. The problem is they are written in v2 and I have v3 installed in my classroom. I read about the 2to3 conversion program, b

Re: to a human - about 2to3

2013-05-01 Thread Mark Lawrence
On 01/05/2013 15:52, Jennifer Butler wrote: Hiya I have trawled around your various pages and haven’t found what I want. I will start teaching Python to my pupils shortly. I have been looking for materials and have gathered a collection of programs. The problem is they are written in v2 and I h

Re: Why chunks is not part of the python standard lib?

2013-05-01 Thread Paul Rubin
Serhiy Storchaka writes: > def chunks(seq, size): > return [seq[i: i + size] for i in range(0, len(seq), size)] That's just for lists. An itertools version would work with arbitrary iterables. I've also had to rewrite that function more times than seems proper. -- http://mail.python.org/ma

Re: Why chunks is not part of the python standard lib?

2013-05-01 Thread Serhiy Storchaka
01.05.13 09:26, Ricardo Azpeitia Pimentel написав(ла): After reading How do you split a list into evenly sized chunks in Python? and seeing this kind of mistakes happening https://code.djangopro

Re: to a human - about 2to3

2013-05-01 Thread Tim Golden
On 01/05/2013 15:52, Jennifer Butler wrote: > I will start teaching Python to my pupils shortly. I have been looking > for materials and have gathered a collection of programs. The problem is > they are written in v2 and I have v3 installed in my classroom. I read > about the 2to3 conversion progra

Re: to a human - about 2to3

2013-05-01 Thread Chris Angelico
On Thu, May 2, 2013 at 1:11 AM, Paul Rudin wrote: > "Jennifer Butler" writes: > >> Hiya >> >> I have trawled around your various pages and haven’t found what I >> want. >> >> I will start teaching Python to my pupils shortly. I have been looking >> for materials and have gathered a collection of

Re: to a human - about 2to3

2013-05-01 Thread Paul Rudin
"Jennifer Butler" writes: > Hiya > > I have trawled around your various pages and haven’t found what I > want. > > I will start teaching Python to my pupils shortly. I have been looking > for materials and have gathered a collection of programs. The problem > is they are written in v2 and I have

to a human - about 2to3

2013-05-01 Thread Jennifer Butler
Hiya I have trawled around your various pages and haven't found what I want. I will start teaching Python to my pupils shortly. I have been looking for materials and have gathered a collection of programs. The problem is they are written in v2 and I have v3 installed in my classroom. I r

Re: ANN: ActivePython 3.2.2.3 is now available

2013-05-01 Thread Kevin Walzer
On 5/1/13 8:01 AM, Robert wrote: Will this be the last one? It has been two years. Hard to say. AS has been focusing on cloud-based stuff lately. ActivePerl hasn't been updated for a long time either. ActiveTcl is still maintained. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevi

Re: Why chunks is not part of the python standard lib?

2013-05-01 Thread Mark Lawrence
On 01/05/2013 10:00, Oscar Benjamin wrote: On 1 May 2013 08:10, Mark Lawrence wrote: On 01/05/2013 07:26, Ricardo Azpeitia Pimentel wrote: After reading How do you split a list into evenly sized chunks in Python?

Re: in need of some help...

2013-05-01 Thread Jens Thoms Toerring
Alex Norton wrote: > thanks... ill take a look at the Qt event handling It's rather simple: instead of the program running through a sequence of steps, the program normally is basically doing nothing. It just reacts to events that normally come from the user, i.e. the user clicks on some icon or

Re: ANN: ActivePython 3.2.2.3 is now available

2013-05-01 Thread Robert
Will this be the last one? It has been two years. -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding referents with Gdb

2013-05-01 Thread Skip Montanaro
On Tue, Apr 23, 2013 at 9:52 AM, Dave Butler wrote: > with gdb, can you find referents of an object given an object id? Look at the C code for gc.get_referents and set things up to call it from GDB. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: in need of some help...

2013-05-01 Thread Alex Norton
On Wednesday, 1 May 2013 05:37:34 UTC+1, Chris Angelico wrote: > On Wed, May 1, 2013 at 9:20 AM, Alex Norton wrote: > > > the teacher actually cant teach anything, he as the knowledge of Vb but his > > teaching methods are abysmal and severely lacking, but he said we can use > > any language w

Re: Why chunks is not part of the python standard lib?

2013-05-01 Thread Oscar Benjamin
On 1 May 2013 08:10, Mark Lawrence wrote: > On 01/05/2013 07:26, Ricardo Azpeitia Pimentel wrote: >> >> After reading How do you split a list into evenly sized chunks in >> Python? >> >> >> >> an

Re: Finding referents with Gdb

2013-05-01 Thread Stefan Behnel
Dave Butler, 23.04.2013 16:52: > with gdb, can you find referents of an object given an object id? Have you looked at the gc module? And, could you explain why you want to work with the object's ID instead of the object reference itself? Stefan -- http://mail.python.org/mailman/listinfo/python

Re: Finding referents with Gdb

2013-05-01 Thread dieter
Dave Butler writes: > with gdb, can you find referents of an object given an object id? Usually no. "gdb" is a C level debugger. If debugging information is available (and the type of an object know), "gdb" can show you the fields of an object. If you know the correct type, you can cast an obje

Re: Drag and drop in Windows

2013-05-01 Thread Christian Gollwitzer
Hi Robert, Am 01.05.13 10:06, schrieb Robert Flintham: Thanks Kevin, that looks great. It's having trouble finding TkDND though - is there a certain place in the "Python27" directory that it's most likely to look? It's currently under Lib/site-packages, but I'm suspicious that Tk/Tkinter has i

RE: Drag and drop in Windows

2013-05-01 Thread Robert Flintham
Thanks Kevin, that looks great. It's having trouble finding TkDND though - is there a certain place in the "Python27" directory that it's most likely to look? It's currently under Lib/site-packages, but I'm suspicious that Tk/Tkinter has its own library somewhere. Christian - you were right.

Re: Why chunks is not part of the python standard lib?

2013-05-01 Thread Mark Lawrence
On 01/05/2013 07:26, Ricardo Azpeitia Pimentel wrote: After reading How do you split a list into evenly sized chunks in Python? and seeing this kind of mistakes happening https://code.djangoproj