@ThomasLecocq i did the small py3k adaption for this request (https://github.com/obspy/obspy/commit/cb74befa9563a8d9a647ff5c82fa7923acef82da), see also https://github.com/obspy/obspy/wiki/Python-3-Pitfalls.

Dictionaries are really randomly ordered in Py3k. By holding the output in a dict, you cannot guarantee that you will get a first in first out like behavior for `output.keys()`. So first trace in data file, will not necessarily be first trace in stream.