why does the following with Queue, q.put('\x02', True) not put it in the queue?

Gabriel Rossetti gabriel.rossetti at mydeskfriend.com
Fri Apr 25 17:11:00 CEST 2008


Arimaz SA
Av. du 24 Janvier 11
Ateliers de la Ville de Renens, Atelier 5
1020 Renens, Switzerland
www.mydeskfriend.com
Mob: +41-(0)79-539-0069
Tel: +41-(0)21-566-7343



sturlamolden wrote:
> On Apr 25, 4:38 pm, Gabriel Rossetti
> <gabriel.rosse... at mydeskfriend.com> wrote:
>   
>> Hello,
>>
>> I'm having some trouble with the Queue class, for some reason, if I do
>> this (ch ==  ) :
>>
>> q = Queue.Queue(0)
>> repr(ch)
>> q.put(ch, True)
>> len(q.queue)
>>     
>
>   
>>>> from Queue import Queue
>>>> q = Queue(0)
>>>> s = '\x02'
>>>> q.put(s,True)
>>>> len(q.queue)
>>>>         
> 1
>
>
>
>   
yes, if you do it that way (s = '\x02') it works, but I read the data 
from a file, and I that way it doesn't work....



More information about the Python-list mailing list