Look at the mmap and array modules. Mmap lets you directly access the disk files by mapping them into memory. The array module lets you read those big files into memory without the overhead of tuple or list structure (but of course your application must then interpret the contents). Beyond that, we need more specific info to make more concrete suggestions.