I found construct quite good to parse binary data too. Had used antlr with java but needed something simpler and for python.<p><a href="https:&#x2F;&#x2F;pypi.python.org&#x2F;pypi&#x2F;construct" rel="nofollow">https:&#x2F;&#x2F;pypi.python.org&#x2F;pypi&#x2F;construct</a>