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 lan
William Gibson, Vernor Vinge, John
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
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(enum
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
pn()
it works on infinite lists.
from itertools import groupby, imap
def chunk(it, n=0):
if n == 0:
return iter([it])
grouped = groupby(enumerate(it), lambda x: int(x[0]/n))
counted = imap(lambda x:x[1], grouped)
return imap(lambda x: imap(lambda y: y[1], x), counted)
>>>
d XML files as they'd look if done by hand?
> >
> > Thanks.
You can roll your own by starting at the root 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
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]: cu
g faith that the extra work I'm
putting in to design my table classes will pay off in a more 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
[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?
--
http://mail.python.org/mailm