randomly write to a file

rohit rohitsethidce at gmail.com
Mon May 7 15:51:37 EDT 2007


hi,
i am developing a desktop search.For the index of the files i have
developed an algorithm with which
 i should be able to read and write to a line if i know its line
number.
i can read a specified line by using the module linecache
but i am struck as to how to implement writing to the n(th) line in a
file EFFICIENTLY
which means i don't want to traverse the file sequentially to reach
the n(th) line

Please help.
Regards
Rohit




More information about the Python-list mailing list