xdis


Namexdis JSON
Version 3.6.3 PyPI version JSON
download
home_pagehttps://github.com/rocky/python-xdis/
SummaryPython cross-version byte-code disassembler and marshal routines
upload_time2017-12-09 09:08:19
maintainer
docs_urlNone
authorRocky Bernstein, Hartmut Goebel and others
requires_python
licenseGPL-2.0
keywords
VCS
bugtrack_url
requirements None
Travis-CI
coveralls test coverage No coveralls.
            |buildstatus| |Supported Python Versions|

xdis
==========

Cross-Python bytecode Disassembler and Marshal routines


Introduction
------------

The Python `dis` module allows you to disassemble bytecode from the same
version of Python that you are running on. But what about bytecode from
different versions?

That's what this package is for. It can "marshal load" Python
bytecodes from different versions of Python. The command-line routine
*pydisasm* will show disassembly output using Python 3.6 disassembly
conventions.

It accepts bytecodes from Python version 1.5 to 3.6 or so. The code
requires Python 2.4 or later and has been tested on Python running
lots of Python versions.

To install versions for Python before 2.6 install via eggs or
use the python-2.4 branch of git in github.


Installation
------------

This uses setup.py, so it follows the standard Python routine:

::

    pip install -r requirements.txt
    pip install -r requirements-dev.txt
    python setup.py install # may need sudo
    # or if you have pyenv:
    python setup.py develop

A GNU makefile is also provided so :code:`make install` (possibly as root or
sudo) will do the steps above.

Testing
-------

::

   make check

A GNU makefile has been added to smooth over setting running the right
command, and running tests from fastest to slowest.

If you have remake_ installed, you can see the list of all tasks
including tests via :code:`remake --tasks`.


Usage
-----

Run

::

     ./bin/pydisasm -h

for usage help.


As a drop-in replacement for dis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

`xdis` also provides some support as a drop in replacement for the
the Python library `dis <https://docs.python.org/3/library/dis.html>`_
module. This is may be desirable when you want to use the improved API
from Python 3.4 or later from an earlier Python version.

For example:

>>> # works in Python 2 and 3
>>> import xdis.std as dis
>>> [x.opname for x in dis.Bytecode('a = 10')]
['LOAD_CONST', 'STORE_NAME', 'LOAD_CONST', 'RETURN_VALUE']

There may some small differences in output produced for formatted
disassembly or how we show compiler flags. We expect you'll
find the `xdis` output more informative though.

See Also
--------

* https://github.com/rocky/python-uncompyle6 : python bytecode deparsing
* https://github.com/rocky/python-xasm : python bytecode assembler

.. |downloads| image:: https://img.shields.io/pypi/dd/xdis.svg
.. _trepan: https://pypi.python.org/pypi/trepan
.. _debuggers: https://pypi.python.org/pypi/trepan3k
.. _remake: http://bashdb.sf.net/remake
.. |buildstatus| image:: https://travis-ci.org/rocky/python-xdis.svg
		 :target: https://travis-ci.org/rocky/python-xdis
.. |Supported Python Versions| image:: https://img.shields.io/pypi/pyversions/xdis.svg
            

Raw data

            {
    "maintainer": "", 
    "docs_url": null, 
    "requires_python": "", 
    "maintainer_email": "", 
    "cheesecake_code_kwalitee_id": null, 
    "keywords": "", 
    "upload_time": "2017-12-09 09:08:19", 
    "requirements": [
        {
            "name": null, 
            "specs": []
        }
    ], 
    "author": "Rocky Bernstein, Hartmut Goebel and others", 
    "home_page": "https://github.com/rocky/python-xdis/", 
    "github_user": "rocky", 
    "appveyor": true, 
    "download_url": "https://pypi.python.org/packages/ca/69/9b1171092034beaf4083b6d911ef8434e65a528cc3c64ad80ff736c1cb90/xdis-3.6.3.tar.gz", 
    "platform": "", 
    "version": "3.6.3", 
    "cheesecake_documentation_id": null, 
    "circle": true, 
    "description": "|buildstatus| |Supported Python Versions|\n\nxdis\n==========\n\nCross-Python bytecode Disassembler and Marshal routines\n\n\nIntroduction\n------------\n\nThe Python `dis` module allows you to disassemble bytecode from the same\nversion of Python that you are running on. But what about bytecode from\ndifferent versions?\n\nThat's what this package is for. It can \"marshal load\" Python\nbytecodes from different versions of Python. The command-line routine\n*pydisasm* will show disassembly output using Python 3.6 disassembly\nconventions.\n\nIt accepts bytecodes from Python version 1.5 to 3.6 or so. The code\nrequires Python 2.4 or later and has been tested on Python running\nlots of Python versions.\n\nTo install versions for Python before 2.6 install via eggs or\nuse the python-2.4 branch of git in github.\n\n\nInstallation\n------------\n\nThis uses setup.py, so it follows the standard Python routine:\n\n::\n\n    pip install -r requirements.txt\n    pip install -r requirements-dev.txt\n    python setup.py install # may need sudo\n    # or if you have pyenv:\n    python setup.py develop\n\nA GNU makefile is also provided so :code:`make install` (possibly as root or\nsudo) will do the steps above.\n\nTesting\n-------\n\n::\n\n   make check\n\nA GNU makefile has been added to smooth over setting running the right\ncommand, and running tests from fastest to slowest.\n\nIf you have remake_ installed, you can see the list of all tasks\nincluding tests via :code:`remake --tasks`.\n\n\nUsage\n-----\n\nRun\n\n::\n\n     ./bin/pydisasm -h\n\nfor usage help.\n\n\nAs a drop-in replacement for dis\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n`xdis` also provides some support as a drop in replacement for the\nthe Python library `dis <https://docs.python.org/3/library/dis.html>`_\nmodule. This is may be desirable when you want to use the improved API\nfrom Python 3.4 or later from an earlier Python version.\n\nFor example:\n\n>>> # works in Python 2 and 3\n>>> import xdis.std as dis\n>>> [x.opname for x in dis.Bytecode('a = 10')]\n['LOAD_CONST', 'STORE_NAME', 'LOAD_CONST', 'RETURN_VALUE']\n\nThere may some small differences in output produced for formatted\ndisassembly or how we show compiler flags. We expect you'll\nfind the `xdis` output more informative though.\n\nSee Also\n--------\n\n* https://github.com/rocky/python-uncompyle6 : python bytecode deparsing\n* https://github.com/rocky/python-xasm : python bytecode assembler\n\n.. |downloads| image:: https://img.shields.io/pypi/dd/xdis.svg\n.. _trepan: https://pypi.python.org/pypi/trepan\n.. _debuggers: https://pypi.python.org/pypi/trepan3k\n.. _remake: http://bashdb.sf.net/remake\n.. |buildstatus| image:: https://travis-ci.org/rocky/python-xdis.svg\n\t\t :target: https://travis-ci.org/rocky/python-xdis\n.. |Supported Python Versions| image:: https://img.shields.io/pypi/pyversions/xdis.svg", 
    "tox": true, 
    "lcname": "xdis", 
    "bugtrack_url": "", 
    "github": true, 
    "coveralls": false, 
    "name": "xdis", 
    "license": "GPL-2.0", 
    "travis_ci": true, 
    "github_project": "python-xdis", 
    "summary": "Python cross-version byte-code disassembler and marshal routines", 
    "split_keywords": [], 
    "author_email": "rb@dustyfeet.com", 
    "urls": [
        {
            "has_sig": false, 
            "upload_time": "2017-12-09T09:08:10", 
            "comment_text": "", 
            "python_version": "2.4", 
            "url": "https://pypi.python.org/packages/dc/15/2a190898dfd52de4aacd0f863c55e8c06e4bf2572ced6dcda438535c44ac/xdis-3.6.3-py2.4.egg", 
            "md5_digest": "8b27ca7037084de8d2aa8c12ea239eeb", 
            "downloads": 0, 
            "filename": "xdis-3.6.3-py2.4.egg", 
            "packagetype": "bdist_egg", 
            "path": "dc/15/2a190898dfd52de4aacd0f863c55e8c06e4bf2572ced6dcda438535c44ac/xdis-3.6.3-py2.4.egg", 
            "size": 163909
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-12-09T09:08:12", 
            "comment_text": "", 
            "python_version": "2.5", 
            "url": "https://pypi.python.org/packages/1c/1b/ced771f5232284abc044f476038dd59ccbe7d58d150e6cfef69d578617fb/xdis-3.6.3-py2.5.egg", 
            "md5_digest": "0ed14a89eb991c9630e046332945cec8", 
            "downloads": 0, 
            "filename": "xdis-3.6.3-py2.5.egg", 
            "packagetype": "bdist_egg", 
            "path": "1c/1b/ced771f5232284abc044f476038dd59ccbe7d58d150e6cfef69d578617fb/xdis-3.6.3-py2.5.egg", 
            "size": 161146
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-12-09T09:08:14", 
            "comment_text": "", 
            "python_version": "2.6", 
            "url": "https://pypi.python.org/packages/8c/f8/20d5e15e51a4b99ae17b745e1cf23384690258ab5ecca2741a191c3170d3/xdis-3.6.3-py2.6.egg", 
            "md5_digest": "3eefcf628ace7d41fc4cd34e4548f3bb", 
            "downloads": 0, 
            "filename": "xdis-3.6.3-py2.6.egg", 
            "packagetype": "bdist_egg", 
            "path": "8c/f8/20d5e15e51a4b99ae17b745e1cf23384690258ab5ecca2741a191c3170d3/xdis-3.6.3-py2.6.egg", 
            "size": 151568
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-12-09T09:08:04", 
            "comment_text": "", 
            "python_version": "py26", 
            "url": "https://pypi.python.org/packages/a3/f5/dac6eb0f1dcd3804b330e452d4620b66ab022228e9fa873e05deb34eb19e/xdis-3.6.3-py26-none-any.whl", 
            "md5_digest": "f1d3b276932d0915789fe51c78a70230", 
            "downloads": 0, 
            "filename": "xdis-3.6.3-py26-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "path": "a3/f5/dac6eb0f1dcd3804b330e452d4620b66ab022228e9fa873e05deb34eb19e/xdis-3.6.3-py26-none-any.whl", 
            "size": 73353
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-12-09T09:07:18", 
            "comment_text": "", 
            "python_version": "3.3", 
            "url": "https://pypi.python.org/packages/c7/15/4d3fa9d2a8d7e2e61e783eaf46cdbf6eb4dd4355cf8ea6f769692912d9cd/xdis-3.6.3-py3.3.egg", 
            "md5_digest": "dcae57007336e38e60b53f525a61aa16", 
            "downloads": 0, 
            "filename": "xdis-3.6.3-py3.3.egg", 
            "packagetype": "bdist_egg", 
            "path": "c7/15/4d3fa9d2a8d7e2e61e783eaf46cdbf6eb4dd4355cf8ea6f769692912d9cd/xdis-3.6.3-py3.3.egg", 
            "size": 155307
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-12-09T09:08:16", 
            "comment_text": "", 
            "python_version": "3.4", 
            "url": "https://pypi.python.org/packages/8a/d4/9442a21ee557157dce3e60af6f38ed34018dbbd8eca8d343112ee44106cc/xdis-3.6.3-py3.4.egg", 
            "md5_digest": "fcd3e91f2a2b72bdf6e0892e98a76da5", 
            "downloads": 0, 
            "filename": "xdis-3.6.3-py3.4.egg", 
            "packagetype": "bdist_egg", 
            "path": "8a/d4/9442a21ee557157dce3e60af6f38ed34018dbbd8eca8d343112ee44106cc/xdis-3.6.3-py3.4.egg", 
            "size": 154711
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-12-09T09:08:17", 
            "comment_text": "", 
            "python_version": "3.6", 
            "url": "https://pypi.python.org/packages/b6/db/09e507887c117008e0b0d3b7152584389eb7222a085a10ee469a7e0de4a9/xdis-3.6.3-py3.6.egg", 
            "md5_digest": "57aac0b8de150b78603b7024966017eb", 
            "downloads": 0, 
            "filename": "xdis-3.6.3-py3.6.egg", 
            "packagetype": "bdist_egg", 
            "path": "b6/db/09e507887c117008e0b0d3b7152584389eb7222a085a10ee469a7e0de4a9/xdis-3.6.3-py3.6.egg", 
            "size": 151587
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-12-09T09:08:05", 
            "comment_text": "", 
            "python_version": "py33", 
            "url": "https://pypi.python.org/packages/7c/4b/200cc3176e9945995d02dd59aaade92cc9767c23c6288ade4c6423a54822/xdis-3.6.3-py33-none-any.whl", 
            "md5_digest": "7f5ff9c9e8187956cf8c02d64fb262f7", 
            "downloads": 0, 
            "filename": "xdis-3.6.3-py33-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "path": "7c/4b/200cc3176e9945995d02dd59aaade92cc9767c23c6288ade4c6423a54822/xdis-3.6.3-py33-none-any.whl", 
            "size": 73321
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-12-09T09:08:07", 
            "comment_text": "", 
            "python_version": "py34", 
            "url": "https://pypi.python.org/packages/42/8c/18dfd83b07741eabaa91b71de345a78a35415f70f1f54b0b4861ec165e33/xdis-3.6.3-py34-none-any.whl", 
            "md5_digest": "128e021c8d43b5d4dc6cb65c0dc819be", 
            "downloads": 0, 
            "filename": "xdis-3.6.3-py34-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "path": "42/8c/18dfd83b07741eabaa91b71de345a78a35415f70f1f54b0b4861ec165e33/xdis-3.6.3-py34-none-any.whl", 
            "size": 73324
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-12-09T09:08:08", 
            "comment_text": "", 
            "python_version": "py36", 
            "url": "https://pypi.python.org/packages/e8/b6/a6c76346a8a1dbff3e039c3794d68198020e208ae02e8458d0563eea6598/xdis-3.6.3-py36-none-any.whl", 
            "md5_digest": "78b7f171cf15a8a1875dd6fd4e3dcd4f", 
            "downloads": 0, 
            "filename": "xdis-3.6.3-py36-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "path": "e8/b6/a6c76346a8a1dbff3e039c3794d68198020e208ae02e8458d0563eea6598/xdis-3.6.3-py36-none-any.whl", 
            "size": 73318
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-12-09T09:08:19", 
            "comment_text": "", 
            "python_version": "source", 
            "url": "https://pypi.python.org/packages/ca/69/9b1171092034beaf4083b6d911ef8434e65a528cc3c64ad80ff736c1cb90/xdis-3.6.3.tar.gz", 
            "md5_digest": "aa6c43a90897eb755260848cb589d7c1", 
            "downloads": 0, 
            "filename": "xdis-3.6.3.tar.gz", 
            "packagetype": "sdist", 
            "path": "ca/69/9b1171092034beaf4083b6d911ef8434e65a528cc3c64ad80ff736c1cb90/xdis-3.6.3.tar.gz", 
            "size": 167340
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}