Re: Calling Queue experts

2007-03-26 Thread Gabriel Genellina
En Mon, 26 Mar 2007 07:29:32 -0300, jrpfinch <[EMAIL PROTECTED]> escribió: > Got it. New PickleQueue class should be as follows: Only a comment: > def _init(self, maxsize): > # Implements Queue protocol _init for persistent queue. > # Sets up the pickle files. > self

Re: Calling Queue experts

2007-03-26 Thread skip
jrpfinch> # Some other I/O problem, reraise error jrpfinch> raise err I'd just execute a bare raise (without err). That way the caller gets the stack trace of the actual IOError. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling Queue experts

2007-03-26 Thread jrpfinch
Got it. New PickleQueue class should be as follows: import Queue import cPickle class PickleQueue(Queue.Queue): """A multi-producer, multi-consumer, persistent queue.""" def __init__(self, filename, maxsize=0): """Initialize a persistent queue with a filename and maximum size.

Calling Queue experts

2007-03-26 Thread jrpfinch
I have a script which is based on the following code. Unfortunately, it only works on Python 2.3 and not 2.5 because there is no esema or fsema attribute in the 2.5 Queue. I am hunting through the Queue.py code now to try to figure out how to make it work in 2.5, but as I am a beginner, I am havi