sorts.external_sort

Classes

ExternalSort

FileMerger

FileSplitter

FilesArray

NWayMerge

Functions

main()

parse_memory(string)

Module Contents

class sorts.external_sort.ExternalSort(block_size)
get_number_blocks(filename, block_size)
sort(filename, sort_key=None)
block_size
class sorts.external_sort.FileMerger(merge_strategy)
get_file_handles(filenames, buffer_size)
merge(filenames, outfilename, buffer_size)
merge_strategy
class sorts.external_sort.FileSplitter(filename)
cleanup()
get_block_filenames()
split(block_size, sort_key=None)
write_block(data, block_number)
BLOCK_FILENAME_FORMAT = 'block_{0}.dat'
block_filenames = []
filename
class sorts.external_sort.FilesArray(files)
get_dict()
refresh()
unshift(index)
buffers
empty
files
num_buffers
class sorts.external_sort.NWayMerge
select(choices)
sorts.external_sort.main()
sorts.external_sort.parse_memory(string)