espressomd/espresso — pull request #134 by mkuron (2014-02-10 15:10:09+00:00)
Title: Blockfile parser in Python

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

Example:

```python
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
```