Ordered dictionaries are extremely useful structures, but unfortunately these are quite recent only working in versions from 3.1 and 2.7. How can I use an ordered dictionary
Also you can try future, py2-3 compatible codebase:
future
pip install future
from future.moves.collections import OrderedDict
source