On 12/11/2011 03:46 AM, Massimo Di Stefano wrote:
Hi All,
>
Trying to read the documentation, i'm looking on how to use "
threading.Lock() " and its methods "acquire() and release()" that seems
to be the solution to my issue
... but i'm really far to understand how to implement it in my exampl
Massimo Di Stefano wrote:
[...]
it just print out the list generated during the thread execution, while i'm tring to return it.
Since lista is a mutable global variable, you don't need to return it. Just
look at lista once the threads have completed its work and you will find the
content you
On 12/10/2011 8:46 AM Massimo Di Stefano said...
Hi All,
i'm tring to learn how to use threads in python to save a list of
object. i'm starting from this code :
Moving lista into the instance seems to do it...
Emile
#
import threading
import urllib
from tempfile import NamedTempora
Hi All,
i'm tring to learn how to use threads in python to save a list of object. i'm
starting from this code :
#
import threading
import urllib
from tempfile import NamedTemporaryFile
singlelock = threading.Lock()
class download(threading.Thread):
def __init__(self, sitecode, lista):