Wolfgang Draxinger <[EMAIL PROTECTED]> wrote: > Marc 'BlackJack' Rintsch wrote: > > > You mean reading the file without actually reading it!? :-) > > Linux provides its specific syscall 'readahead' that does exactly > this.
It isn't in the posix module, but you can use it with ctypes like this >>> from ctypes import * >>> libc = CDLL("libc.so.6") >>> libc.readahead <_FuncPtr object at 0xb7de9714> >>> f=open("z","rb") >>> f.fileno() 3 >>> libc.readahead(f.fileno(), 0, 0x1000000) 0 >>> (That example could do with more ctypes magic to set the types and the return type of readahead...) -- Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick -- http://mail.python.org/mailman/listinfo/python-list