Most viewed recipes tagged "bytecode"http://code.activestate.com/recipes/tags/bytecode/views/2011-09-29T20:07:10-07:00ActiveState Code RecipesInspect a PYC File (Python) 2011-09-29T20:07:10-07:00Eric Snowhttp://code.activestate.com/recipes/users/4177816/http://code.activestate.com/recipes/577880-inspect-a-pyc-file/ <p style="color: grey"> Python recipe 577880 by <a href="/recipes/users/4177816/">Eric Snow</a> (<a href="/recipes/tags/bytecode/">bytecode</a>, <a href="/recipes/tags/inspection/">inspection</a>, <a href="/recipes/tags/pyc/">pyc</a>). Revision 3. </p> <p>This is a revamp of a recipe that Ned Batchelder <a href="http://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html">posted on his blog</a> a few years ago (thanks Ned!). That page is pretty insightful, recipe aside.</p> <p>This recipe works for all versions of Python back to 2.4 (at least). Warning: using one version of Python to inspect a pyc file from another Python version may not work too well.</p>