Blockfile parser in Python.

Provides an iterator over all blocks.
Particles and variable blocks are converted to numpy arrays.

Example:

import blockfile
bf = blockfile.open('cfg-equ-0.50')
for block_type, block in bf:
	if block_type == 'particles':
		# print out the position of particle number 875
		particle_id = 875
		particle_id = numpy.flatnonzero(block['id'] == particle_id)[0]
		print block['pos'][particle_id]
	elif block_type == 'variable':
		# print out all variable blocks
		print block
Merge pull request #134 from mkuron/blockfile-py

Blockfile parser in Python