Re: how to send a json of yield list

2016-10-14 Thread meInvent bbird
when not to use queue, it is faster now while True: for ii in getcombinations(): item = ii print(item) sock.send(json.dumps(ii)) On Friday, October 14, 2016 at 5:11:35 PM UTC+8, meInvent bbird wrote: > succeed to run, > > is it the yield return the whole

Re: how to send a json of yield list

2016-10-14 Thread meInvent bbird
succeed to run, is it the yield return the whole list 2000 * 2000 * 2000 items? as i know that yield is return [1,1,1] etc one by one once it get if it return 2000*2000*2000 items, why? i have to add a queue get this yield in order to succeed but i do not understand the situation when using

Re: how to send a json of yield list

2016-10-14 Thread dieter
meInvent bbird writes: > after google a several solutions, > First method i searched has memory error > sock.send(json.dumps(StreamArray())) > Traceback (most recent call last): > File "pusher.py", line 43, in > sock.send(json.dumps(StreamArray())) > ... >

how to send a json of yield list

2016-10-13 Thread meInvent bbird
after google a several solutions, First method i searched has memory error sock.send(json.dumps(StreamArray())) Traceback (most recent call last): File "pusher.py", line 43, in sock.send(json.dumps(StreamArray())) File "C:\Python27\lib\json\__init__.py", line 243, in dumps return