Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/myint/pydiff
Diffs Python code at the bytecode level
https://github.com/myint/pydiff
Last synced: 4 days ago
JSON representation
Diffs Python code at the bytecode level
- Host: GitHub
- URL: https://github.com/myint/pydiff
- Owner: myint
- Created: 2013-05-26T23:14:23.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-30T02:46:42.000Z (almost 10 years ago)
- Last Synced: 2024-10-06T11:35:55.541Z (about 1 month ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/pydiff
- Size: 273 KB
- Stars: 10
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
======
pydiff
======.. image:: https://travis-ci.org/myint/pydiff.svg?branch=master
:target: https://travis-ci.org/myint/pydiff
:alt: Build statuspydiff diffs Python code at the bytecode level. This is useful for checking for
changes to the actual code structure while ignoring formatting changes.Installation
============From pip::
$ pip install --upgrade pydiff
Example
=======``foo.py``:
.. code-block:: python
import os, sys
def main():x = len(sys.argv) + 100
y = x+77
print(y)``bar.py``:
.. code-block:: python
import os
import sysdef main():
x = len(sys.argv) + 101
y = x + 77
print(y)``$ pydiff foo.py bar.py``:
.. code-block:: diff
--- foo.py
+++ bar.py
@@ -87,7 +87,7 @@
'<0>',
'<0>',
'RETURN_VALUE'],
- 'co_consts': [None, 100, 77],
+ 'co_consts': [None, 101, 77],
'co_flags': 67,
'co_freevars': (),
'co_kwonlyargcount': 0,