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.
>
> 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()
>
>>
[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
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
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
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)