On 11:15 am, p...@boddie.org.uk wrote:
On 22 Nov, 05:10, exar...@twistedmatrix.com wrote:
"tail -f" is implemented by sleeping a little bit and then reading to
see if there's anything new.
This was the apparent assertion behind the "99 Bottles" concurrency
example:
http://wiki.python.org/moi
On 22 Nov, 05:10, exar...@twistedmatrix.com wrote:
>
> "tail -f" is implemented by sleeping a little bit and then reading to
> see if there's anything new.
This was the apparent assertion behind the "99 Bottles" concurrency
example:
http://wiki.python.org/moin/Concurrency/99Bottles
However, as I
In article ,
Matt Nordhoff wrote:
>Jason Sewall wrote:
>>
>> FWIW, GNU tail on Linux uses inotify for tail -f:
>
>Some other operating systems have similar facilities, e.g. FSEvents on OS X.
Having spent some time with FSEvents, I would not call it particularly
similar to inotify. FSEvents only
On Sun, 22 Nov 2009 03:43:31 +0100, Ivan Voras wrote:
> The problem is: poll() always returns that the fd is ready (without
> waiting), but read() always returns an empty string. Actually, it
> doesn't matter if I turn O_NDELAY on or off. select() does the same.
Regular files are always "ready" f
Matt Nordhoff writes:
> Jason Sewall wrote:
>> FWIW, GNU tail on Linux uses inotify for tail -f:
>>
>> http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/tail.c
>>
>> The wikipedia page for inotify lists several python bindings:
>>
>> http://en.wikipedia.org/wiki/Inotify
>>
>> Not much h
On Sun, Nov 22, 2009 at 03:43 +0100, Ivan Voras wrote:
> I'm trying to simply imitate what "tail -f" does, i.e. read a file, wait
> until it's appended to and process the new data, but apparently I'm
> missing something.
[..]
> Any advice?
Have a look at [1], which mimics "tail -f" perfectly. It c
Jason Sewall wrote:
> FWIW, GNU tail on Linux uses inotify for tail -f:
>
> http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/tail.c
>
> The wikipedia page for inotify lists several python bindings:
>
> http://en.wikipedia.org/wiki/Inotify
>
> Not much help for non-Linux users, but there
FWIW, GNU tail on Linux uses inotify for tail -f:
http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/tail.c
The wikipedia page for inotify lists several python bindings:
http://en.wikipedia.org/wiki/Inotify
Not much help for non-Linux users, but there it is. Too bad, because inotify
is pre
On 02:43 am, ivo...@gmail.com wrote:
I'm trying to simply imitate what "tail -f" does, i.e. read a file,
wait
until it's appended to and process the new data, but apparently I'm
missing something.
The code is:
54 f = file(filename, "r", 1)
55 f.seek(-1000, os.SEEK_END)
56 ff = fcnt
I'm trying to simply imitate what "tail -f" does, i.e. read a file, wait
until it's appended to and process the new data, but apparently I'm
missing something.
The code is:
54 f = file(filename, "r", 1)
55 f.seek(-1000, os.SEEK_END)
56 ff = fcntl.fcntl(f.fileno(), fcntl.F_GETFL)
5
10 matches
Mail list logo