On 05/08/2013 22:47, Luca Cerone wrote:
You're back to using separate threads for the reader and the writer.

And how do I create separate threads in Python? I was trying to use the 
threading library without not too success..

To run a function in a separate thread:

import threading

def my_func(arg_1, arg_2):
    ...

my_thread = threading.Thread(target=my_func, args=(arg_1, arg_2))
my_thread.start()


Is the thread still running?

if my_thread.is_alive():
    ...


Wait for the thread to terminate:

my_thread.join()

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to