Martje_001
November 22nd, 2008, 10:26 PM
Hello,
Here (http://docs.python.org/library/io.html#text-i-o) I read about streams in Python. Now my question is: How do I setup such a stream?
Let me explain why I want this; I have developed code which creates 4 threads to split some work. To give new work to a thread and read his status you have to, somehow, stream it to a stream.
So:
stream.open()
Start thread 1 (which writes to stream)
Start thread 2
for i in stream.readline():
process i
Could someone help me with this?
Here (http://docs.python.org/library/io.html#text-i-o) I read about streams in Python. Now my question is: How do I setup such a stream?
Let me explain why I want this; I have developed code which creates 4 threads to split some work. To give new work to a thread and read his status you have to, somehow, stream it to a stream.
So:
stream.open()
Start thread 1 (which writes to stream)
Start thread 2
for i in stream.readline():
process i
Could someone help me with this?