PIL threading problems

2012-05-29 Thread Paul Rubin
Kind of a long shot, but are there known problems in calling PIL from multiple threads? I'm getting weird intermittent core dumps from my app, no idea what's causing them, but PIL is the only C module I'm using, and I do see some mention on the interwebs that there might be an issue: http://lis

Re: Python 2.7.3, C++ embed memory leak?

2012-05-29 Thread Qi
On 2012-5-29 23:29, Ulrich Eckhardt wrote: Call the pair of functions twice, if the reported memory leak doesn't increase, there is no problem. I personally wouldn't even call this a leak then, but that depends a bit on the precise definition. I should still call it a memory leak though it see

WatPy: A new Python User Group in Kitchener-Waterloo, Ontario

2012-05-29 Thread Albert O'Connor
We are having our first night of talks on Thursday June 7th, 6:30 at the Communitech Hub in downtown Kitchener. More information: http://watpy.ca/blog/post/peer-2-peer-talks/ Albert O'Connor -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding all regex matches by index?

2012-05-29 Thread Ian Kelly
On Tue, May 29, 2012 at 7:45 PM, MRAB wrote: > On 30/05/2012 02:33, Roy Smith wrote: >> >> I have a long string (possibly 100s of Mbytes) that I want to search for >> regex matches.  re.finditer() is *almost* what I want, but the problem >> is that it returns matching strings.  What I need is a li

Re: Finding all regex matches by index?

2012-05-29 Thread Ian Kelly
On Tue, May 29, 2012 at 7:33 PM, Roy Smith wrote: > I have a long string (possibly 100s of Mbytes) that I want to search for > regex matches.  re.finditer() is *almost* what I want, but the problem > is that it returns matching strings.  What I need is a list of offsets > in the string where the r

Re: Finding all regex matches by index?

2012-05-29 Thread Roy Smith
In article , Roy Smith wrote: > I have a long string (possibly 100s of Mbytes) that I want to search for > regex matches. re.finditer() is *almost* what I want, but the problem > is that it returns matching strings. What I need is a list of offsets > in the string where the regex matched.

Re: Finding all regex matches by index?

2012-05-29 Thread MRAB
On 30/05/2012 02:33, Roy Smith wrote: I have a long string (possibly 100s of Mbytes) that I want to search for regex matches. re.finditer() is *almost* what I want, but the problem is that it returns matching strings. What I need is a list of offsets in the string where the regex matched. Thus

Finding all regex matches by index?

2012-05-29 Thread Roy Smith
I have a long string (possibly 100s of Mbytes) that I want to search for regex matches. re.finditer() is *almost* what I want, but the problem is that it returns matching strings. What I need is a list of offsets in the string where the regex matched. Thus: s = "this is a string" find("is",

Re: Install lxml package on Windows 7

2012-05-29 Thread Irmen de Jong
On 29-5-2012 22:41, David Fanning wrote: > Folks, > > I need some help. I need the lxml package to run a particular > Python program. > >http://lxml.de/ > > I downloaded the appropriate binary egg package for lxml, and > I found easy_install.exe in my Python 2.7 distribution. I ran > that.

Re: Install lxml package on Windows 7

2012-05-29 Thread David Fanning
David Fanning writes: > > I need some help. I need the lxml package to run a particular > > Python program. > > > >http://lxml.de/ OK, to answer my own question and help someone else out, I eventually found an lxml-2.3.4.exe file on this page: http://code.google.com/p/pythonxy/wiki/Add

Re: Install lxml package on Windows 7

2012-05-29 Thread David Fanning
David Fanning writes: > I need some help. I need the lxml package to run a particular > Python program. > >http://lxml.de/ OK, maybe I am getting somewhere now. I am now running my command window as an Administrator. So, the command window stays open so I can see what is happening. So, fr

Re: Install lxml package on Windows 7

2012-05-29 Thread David Fanning
David Fanning writes: > > Folks, > > I need some help. I need the lxml package to run a particular > Python program. > >http://lxml.de/ > > I downloaded the appropriate binary egg package for lxml, and > I found easy_install.exe in my Python 2.7 distribution. I ran > that. > > Then, at

Install lxml package on Windows 7

2012-05-29 Thread David Fanning
Folks, I need some help. I need the lxml package to run a particular Python program. http://lxml.de/ I downloaded the appropriate binary egg package for lxml, and I found easy_install.exe in my Python 2.7 distribution. I ran that. Then, at the command prompt I typed this: easy_install -

Re: Help doing it the "python way"

2012-05-29 Thread Arnaud Delobelle
On 24 May 2012 21:22, Scott Siegler wrote: > Hello, > > I am an experienced programmer but a beginner to python.  As such, I can > figure out a way to code most algorithms using more "C" style syntax. > > I am doing something now that I am sure is a more python way but i can't > quite get it rig

Re: pygame: transparency question

2012-05-29 Thread Terry Reedy
On 5/29/2012 11:33 AM, Scott Siegler wrote: Hello, I have a surface that I load an image onto. During a collision I would like to clear out the images of both surfaces that collided and show the score. Is there a function call to clear a surface with an image? One way I was thinking was to fi

Re: Help doing it the "python way"

2012-05-29 Thread Jan Kuiken
On 5/24/12 22:22 , Scott Siegler wrote: I am an experienced programmer but a beginner to python. As such, I can figure out a way to code most algorithms using more "C" style syntax. I am doing something now that I am sure is a more python way but i can't quite get it right. I was hoping som

Re: Python 2.7.3, C++ embed memory leak?

2012-05-29 Thread Ulrich Eckhardt
Am 29.05.2012 16:37, schrieb Qi: > I tried to only call Py_Initialize() and Py_Finalize(), nothing else > between those functions, Valgrind still reports memory leaks > on Ubuntu? Call the pair of functions twice, if the reported memory leak doesn't increase, there is no problem. I personally woul

Re: parallel programming in Python

2012-05-29 Thread Werner Thie
For such tasks my choice would be twisted combined with ampoule. Let's you spread out work to whatever amount of processes you desire, maxing out whatever iron you're sitting on.. HTH, Werner http://twistedmatrix.com/trac/ https://launchpad.net/ampoule On 29.05.2012 16:43, Jabba Laci wrote:

pygame: transparency question

2012-05-29 Thread Scott Siegler
Hello, I have a surface that I load an image onto. During a collision I would like to clear out the images of both surfaces that collided and show the score. Is there a function call to clear a surface with an image? One way I was thinking was to fill the surface with a color and then set tha

Re: parallel programming in Python

2012-05-29 Thread Jabba Laci
Hehe, I just asked this question a few days ago but I didn't become much cleverer: http://www.gossamer-threads.com/lists/python/python/985701 Best, Laszlo On Thu, May 10, 2012 at 2:14 PM, Jabba Laci wrote: > Hi, > > I would like to do some parallel programming with Python but I don't > know ho

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-29 Thread Vinay Sajip
Fayaz Yusuf Khan gmail.com> writes: > > ***TRIVIAL ISSUE***, but this has been irking me for a while now. > The main logging.Handler class' __init__ accepts a level argument while none > of its children do. The poor minions seem to be stuck with the setLevel > method which considerably lengthe

Python 2.7.3, C++ embed memory leak?

2012-05-29 Thread Qi
Hi guys, Is there any known memory leak problems, when embed Python 2.7.3 in C++? I Googled but only found some old posts. I tried to only call Py_Initialize() and Py_Finalize(), nothing else between those functions, Valgrind still reports memory leaks on Ubuntu? Is that a know problem? Did Pyt

Re: Mouse LED Control in Python

2012-05-29 Thread reledtubes
We are a LED factory in China, our products are LED tube light, LED bulb light, LED screen, LED strips and so on, our website:, could you please advise how to exploit market on abroad? --- http://www.ledlightonsale.co