Thinker ha scritto:
What you want is something like 'tail -f' in linux.
If you look into it's source code, you will find it check file periodically.
When a read() reach the end of the file, read() will return a empty string.
You can try to read data from the file periodically after a EOF.
I
Michele Simionato ha scritto:
You may begin from this:
Tnx Michele
--
http://mail.python.org/mailman/listinfo/python-list
Hi guys,
I've an application that writes a log file.
I need to write an application with python that will read this file.
I would like wait until a new line will be write in the file.
Something like the watch cat Log command on Linux os.
How can I check the eof and restart the reading?
--
Bjoern Schliessmann ha scritto:
Why not read the file continuously and only do something if a new
line is complete (i. e. a newline char is detected)?
How can I read the file continuously?
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber ha scritto:
Ah, sorry... Warned you that I didn't test...
Duplicate the block of lines with the .join() calls. Put this block
just before them, but after the threading.Thread calls, and change the
.join() to .start()
Tnx Dennis I resolved yesterday after the
Tnx Dennis,
this is my first python program, so I don't know every modules :(
Anyway thank you so much for the suggestions, corrections and for the
whole program :)
Thank you
--
http://mail.python.org/mailman/listinfo/python-list
Hi Dennis,
I have another little problem with your source:
Traceback (most recent call last):
File main.py, line 86, in module
kdi.join() # wait for kdi thread to exit NO CPU HOG BUSY LOOPS
File d:\programmi\python25\lib\threading.py, line 549, in join
assert self.__started, cannot
Hi guys,
when I close the application I get the following error:
-
Traceback (most recent call last):
File main.py, line 88, in module
while exit : pass
KeyboardInterrupt
Unhandled exception in thread started by
Error in sys.excepthook:
Original exception was:
Hi guys,
I'm looking for a tutorial to make a client with a i/o multiplexing and
non blocking socket.
Anybody knows where is a tutorial?
Tnx
--
http://mail.python.org/mailman/listinfo/python-list
Jean-Paul Calderone ha scritto:
On 1 Dec 2006 06:07:28 -0800, Salvatore Di Fazio [EMAIL PROTECTED] wrote:
Hi guys,
I'm looking for a tutorial to make a client with a i/o multiplexing and
non blocking socket.
Anybody knows where is a tutorial?
http://twistedmatrix.com/projects/core
Hi guys,
I would make 3 threads for a client application.
Tnx
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards ha scritto:
You should use 4.
Yes, but I don't know how can I make a thread :)
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards ha scritto:
http://docs.python.org/lib/module-threading.html
http://linuxgazette.net/107/pai.html
http://www.wellho.net/solutions/python-python-threads-a-first-example.html
http://heather.cs.ucdavis.edu/~matloff/Python/PyThreads.pdf
Thank Edward,
I didn't find the linuxgazette
Grant Edwards ha scritto:
http://docs.python.org/lib/module-threading.html
http://linuxgazette.net/107/pai.html
http://www.wellho.net/solutions/python-python-threads-a-first-example.html
http://heather.cs.ucdavis.edu/~matloff/Python/PyThreads.pdf
Thank Edward,
I didn't find the linuxgazette
14 matches
Mail list logo