Re: Re: PyCairo, PIL and StringIO

2008-01-02 Thread Jair Trejo
> > De: Fredrik Lundh <[EMAIL PROTECTED]> > A: python-list@python.org > Fecha: Wed, 02 Jan 2008 15:39:11 +0100 > Asunto: Re: PyCairo, PIL and StringIO > > Jair Trejo wrote: > > > I'm doing some image processing in PIL, and I want > to > > displ

Re: Python-list Digest, Vol 52, Issue 19

2008-01-02 Thread Jair Trejo
> > De: Fredrik Lundh <[EMAIL PROTECTED]> > A: python-list@python.org > Fecha: Wed, 02 Jan 2008 15:39:11 +0100 > Asunto: Re: PyCairo, PIL and StringIO > > Jair Trejo wrote: > > > I'm doing some image processing in PIL, and I want > to > > displ

PyCairo, PIL and StringIO

2008-01-01 Thread Jair Trejo
I'm doing some image processing in PIL, and I want to display the results in a GTK window using PyCairo, so I create a Cairo image surface from the PIL Image like this: mfile = StringIO.StringIO() final.save(mfile, format="PNG") ima = cairo.ImageSurface.create_from_png(mfil

Re: Loops and things

2007-12-14 Thread Jair Trejo
I was wondering how and if it's possible to write a loop in python which updates two or more variables at a time. For instance, something like this in C: for (i = 0, j = 10; i < 10 && j < 20; i++, j++) { printf("i = %d, j = %d\n", i, j); } So that I would get: i = 0, j = 0 i = 1, j = 1 i = 2