Is there a Python file type for accessing random lines without traversing the whole file? I need to search within a large file, reading the whole thing into memory wouldn\'t
Has fixed-length records? If so, yes, you can implement a binary search algorithm using seeking.
Otherwise, load your file into an SQLlite database. Query that.