Re: Watch log

2007-01-16 Thread Salvatore Di Fazio
Michele Simionato ha scritto: > You may begin from this: Tnx Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: Watch log

2007-01-16 Thread Salvatore Di Fazio
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.

Re: Watch log

2007-01-15 Thread Salvatore Di Fazio
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

Watch log

2007-01-15 Thread Salvatore Di Fazio
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? -- ht

Re: Thread error

2006-12-05 Thread Salvatore Di Fazio
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 th

Re: Thread error

2006-12-04 Thread Salvatore Di Fazio
Hi Dennis, I have another little problem with your source: Traceback (most recent call last): File "main.py", line 86, in 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 joi

Re: Thread error

2006-12-04 Thread Salvatore Di Fazio
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

Thread error

2006-12-03 Thread Salvatore Di Fazio
Hi guys, when I close the application I get the following error: - Traceback (most recent call last): File "main.py", line 88, in while exit : pass KeyboardInterrupt Unhandled exception in thread started by Error in sys.excepthook: Original exception was: --

Re: Thread help

2006-12-01 Thread Salvatore Di Fazio
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 linuxgazet

Re: Thread help

2006-12-01 Thread Salvatore Di Fazio
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 linuxgazet

Re: Thread help

2006-12-01 Thread Salvatore Di Fazio
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

Thread help

2006-12-01 Thread Salvatore Di Fazio
Hi guys, I would make 3 threads for a client application. Tnx -- http://mail.python.org/mailman/listinfo/python-list

Re: I/O Multiplexing and non blocking socket

2006-12-01 Thread Salvatore Di Fazio
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

I/O Multiplexing and non blocking socket

2006-12-01 Thread Salvatore Di Fazio
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