Excellent sci-fi novel featuring Python

2007-11-17 Thread Wade Leftwich
Carnack, and Bruce Scheier. What, they couldn't pop for an advance copy for Guido? -- Wade Leftwich Ithaca, NY -- http://mail.python.org/mailman/listinfo/python-list

Re: Excellent sci-fi novel featuring Python

2007-11-17 Thread Wade Leftwich
On Nov 17, 10:37 am, Wade Leftwich [EMAIL PROTECTED] wrote: I'm about halfway through Charles Stross' excellent new novel, Halting State. It's set in Edinburgh in the year 2018, and one of the main characters is a game programmer whose primary language is something called Python 3000

Re: Iterate through list two items at a time

2007-01-04 Thread Wade Leftwich
Wade Leftwich wrote: Jeffrey Froman wrote: Dave Dean wrote: I'm looking for a way to iterate through a list, two (or more) items at a time. Here's a solution, from the iterools documentation. It may not be the /most/ beautiful, but it is short, and scales well for larger

Re: Iterate through list two items at a time

2007-01-04 Thread Wade Leftwich
Peter Otten wrote: Wade Leftwich wrote: from itertools import groupby def chunk(it, n=0): if n == 0: return iter([it]) def groupfun((x,y)): return int(x/n) grouped = groupby(enumerate(it), groupfun) counted = (y for (x,y) in grouped) return

Re: Iterate through list two items at a time

2007-01-03 Thread Wade Leftwich
, itertools.imap object at 0xb78d808c, itertools.imap object at 0xb78d4c6c] -- Wade Leftwich Ithaca, NY -- http://mail.python.org/mailman/listinfo/python-list

Re: ElementTree and proper identation?

2006-09-27 Thread Wade Leftwich
and recursing through child elements, increasing the indentation as you go: But I do it the lazy way: $ xmllint --format ugly.xml pretty.xml -- Wade Leftwich Ithaca, NY -- http://mail.python.org/mailman/listinfo/python-list

Re: Aggregate funuctions broken in MySQLdb?

2006-05-14 Thread Wade Leftwich
Works fine for me, and I certainly hope MySQLdb is ready for prime time, because I use the heck out of it. Maybe you're getting fooled by the fact that cursor.execute() returns the count of result rows. To actually see the result rows, you have to say cursor.fetchone() or fetchall() -- In [34]:

Re: Pythonic wrappers for SQL?

2006-01-16 Thread Wade Leftwich
robust and portable application. The module itself is elegant and well written, and it uses metaclasses to boot. -- Wade Leftwich Ithaca, NY -- http://mail.python.org/mailman/listinfo/python-list

Re: After migrating from debian to ubuntu, tkinter hello world doesn't work

2005-11-30 Thread Wade Leftwich
[EMAIL PROTECTED] wrote: Hi My tkinter apps worked fine in debian linux (woody and sarge) I moved to ubuntu 5.10 I follow the 'hello world' test as seen in http://wiki.python.org/moin/TkInter Ubuntu uses X.org. Did your Debian distro use xfree86? --