Re: How to limit CPU usage in Python

2012-09-25 Thread DPalao
On Jueves septiembre 20 2012 11:12:44 Rolando Cañer Roblejo escribió: > Hi all, > > Is it possible for me to put a limit in the amount of processor usage (% > CPU) that my current python script is using? Is there any module useful > for this task? I saw Resource module but I think it is not the mo

Re: Binding first parameter of method to constant value

2012-05-18 Thread DPalao
ecommend you to have a look at properties and descriptors (I love them). For a general way to deal with attributes: the __getattr__ (to handle undefined attributes), __getattribute__ (to handle *every* attribute; be careful with loops), and __setattr__ (to catch *every* attribute assignmet, same warning concerning loops). Hope it helps. BR, DPalao -- http://mail.python.org/mailman/listinfo/python-list

70% [* SPAM *] Re: multiprocessing.Queue blocks when sending large object

2011-12-05 Thread DPalao
Hi Lie, Thank you for the reply. El Lunes Diciembre 5 2011, Lie Ryan escribió: > On 11/30/2011 06:09 AM, DPalao wrote: > > Hello, > > I'm trying to use multiprocessing to parallelize a code. There is a > > number of tasks (usually 12) that can be run independently. Each

70% [* SPAM *] Re: Re: multiprocessing.Queue blocks when sending large object

2011-12-05 Thread DPalao
El Lunes Diciembre 5 2011, b...@mail.python.org escribió: > On Mon, 5 Dec 2011 09:02:08 +0100, DPalao > > wrote: > >El Martes Noviembre 29 2011, DPalao escribió: > >> Hello, > >> I'm trying to use multiprocessing to parallelize a code. There is a > >&g

70% [* SPAM *] Re: multiprocessing.Queue blocks when sending large object

2011-12-05 Thread DPalao
El Martes Noviembre 29 2011, DPalao escribió: > Hello, > I'm trying to use multiprocessing to parallelize a code. There is a number > of tasks (usually 12) that can be run independently. Each task produces a > numpy array, and at the end, those arrays must be combined. > I im

70% [* SPAM *] multiprocessing.Queue blocks when sending large object

2011-11-29 Thread DPalao
Hello, I'm trying to use multiprocessing to parallelize a code. There is a number of tasks (usually 12) that can be run independently. Each task produces a numpy array, and at the end, those arrays must be combined. I implemented this using Queues (multiprocessing.Queue): one for input and anoth

70% [* SPAM *] Re: shelve trying to import bsddb

2011-02-16 Thread DPalao
El Wednesday February 16 2011, DPalao escribió: > Dear all, > I'm trying to use shelve to store some data, but sheve itself tries to > import > > bsddb, which results in: > > File "/usr/lib64/python2.6/shelve.py", line 239, in open > > > >

70% [* SPAM *] shelve trying to import bsddb

2011-02-16 Thread DPalao
Dear all, I'm trying to use shelve to store some data, but sheve itself tries to import bsddb, which results in: > File "/usr/lib64/python2.6/shelve.py", line 239, in open > return DbfilenameShelf(filename, flag, protocol, writeback) > File "/usr/lib64/python2.6/shelve.py", line 223, in _