Re: Queue() question. This post is pretty long.

2009-04-16 Thread grocery_stocker
On Apr 16, 11:46 am, Piet van Oostrum wrote: > > grocery_stocker (g) wrote: > >g> [cdal...@localhost ~]$ python > >g> Python 2.4.3 (#1, Oct 1 2006, 18:00:19) > >g> [GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2 > >g> Type "help", "copyright", "credits" or "license" for more information. >

Re: Queue() question. This post is pretty long.

2009-04-16 Thread Piet van Oostrum
> grocery_stocker (g) wrote: >g> [cdal...@localhost ~]$ python >g> Python 2.4.3 (#1, Oct 1 2006, 18:00:19) >g> [GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2 >g> Type "help", "copyright", "credits" or "license" for more information. > import Queue > queue = Queue.Queue() > >>

Re: Queue question

2005-10-17 Thread Tim Peters
[Alex Martelli] > ... > not_empty and not_full are not methods but rather instances of the > threading.Condition class, which gets waited on and notified > appropriately. I'm not entirely sure exactly WHAT one is supposed to do > with the Condition instances in question (I'm sure there is some des

Re: Queue question

2005-10-17 Thread Alex Martelli
Steve M <[EMAIL PROTECTED]> wrote: > According to my "Python in a Nutshell": > > q.get(block=True) > > is the signature, so, as you use it above, the call will hang until > something is on the queue. If block is false and the queue is empty, > q.get() will raise the exception Empty. > > q.get_n

Re: Queue question

2005-10-16 Thread spinner
Ahh the penny has dropped at last. I am using the WingIDE and .not_empty is one of the properties it exposes with it's intellisense. As such its use is not documented. No problem. Using the exception would more accurate - I can see that. In my simple case the queue is a one to one link, into an

Re: Queue question

2005-10-15 Thread Steve M
According to my "Python in a Nutshell": q.get(block=True) is the signature, so, as you use it above, the call will hang until something is on the queue. If block is false and the queue is empty, q.get() will raise the exception Empty. q.get_nowait is apparently synonymous with q.get(block=False)