Diff two Python files at the bytecode level.
Project description
Diffs Python code at the bytecode level. This is useful for checking for changes to the actual code structure while ignoring formatting changes.
Example
foo.py:
import os, sys
def main():
x = len(sys.argv) + 100
y = x+77
print(y)
bar.py:
import os
import sys
def main():
x = len(sys.argv) + 101
y = x + 77
print(y)
$ pydiff foo.py bar.py:
---
+++
@@ -4,7 +4,7 @@
None,
{'co_argcount': 0,
'co_cellvars': (),
- 'co_consts': [None, 100, 77],
+ 'co_consts': [None, 101, 77],
'co_flags': 67,
'co_freevars': (),
'co_kwonlyargcount': 0,
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pydiff-0.1.tar.gz
(3.0 kB
view details)
File details
Details for the file pydiff-0.1.tar.gz
.
File metadata
- Download URL: pydiff-0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7972e91a43011538db8c2a7e93ce532e4fa099602e31bf0374566b8a7695c9f7 |
|
MD5 | 3fcfa223d21ae12565dded209c0ad486 |
|
BLAKE2b-256 | dca1fcc0a44f77bf21c07cd93ff428827517f87ca15a39d5a5b9710fe962002a |