juhakivekas / multidiff Goto Github PK
View Code? Open in Web Editor NEWBinary data diffing for multiple objects or streams of data
License: MIT License
Binary data diffing for multiple objects or streams of data
License: MIT License
and possibly make multidiff into a multidiff
Python package while at it ;) It would simplify its distribution (e.g. via pypi), packaging, and (re)use (as a Python module).
Possibly making it optional... I would have added --width=auto
and did max terminal width if that information is available ... here is code from tqdm
tqdm/_utils.py-def _environ_cols_linux(fp): # pragma: no cover
tqdm/_utils.py-
tqdm/_utils.py- try:
tqdm/_utils.py: from termios import TIOCGWINSZ
tqdm/_utils.py- from fcntl import ioctl
tqdm/_utils.py- from array import array
tqdm/_utils.py- except ImportError:
tqdm/_utils.py- return None
tqdm/_utils.py- else:
tqdm/_utils.py- try:
tqdm/_utils.py: return array('h', ioctl(fp, TIOCGWINSZ, '\0' * 8))[1]
tqdm/_utils.py- except:
tqdm/_utils.py- try:
tqdm/_utils.py- from os.environ import get
tqdm/_utils.py- except ImportError:
tqdm/_utils.py- return None
tqdm/_utils.py- else:
tqdm/_utils.py- return int(get('COLUMNS', 1)) - 1
.py
suffix since implementation detail is not importantmultidiff
so I use multidiff
instead of figuring out what is the cmdline entry point)I have install multidiff and I execute the command with window10
“multidiff test1.bin test2.bin”
it doesn't work...
Hello World!
I found your wonderful multidiff from Reddit and wanted to give it a try, but I ran into the following problem:
Running setup as in README:
root@jj:~/multidiff# python3 setup.py install
Traceback (most recent call last):
File "setup.py", line 2, in <module>
from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'
root@jj:~/multidiff# apt install python3-setuptools/kali-rolling
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '39.1.0-1' (kali-rolling [all]) for 'python3-setuptools'
..
Setting up python3-pkg-resources (39.1.0-1) ...
Setting up python3-setuptools (39.1.0-1) ...
root@jj:~/multidiff#
root@jj:~/multidiff# python3 setup.py install
running install
running bdist_egg
running egg_info
creating multidiff.egg-info
writing multidiff.egg-info/PKG-INFO
writing dependency_links to multidiff.egg-info/dependency_links.txt
writing entry points to multidiff.egg-info/entry_points.txt
writing requirements to multidiff.egg-info/requires.txt
writing top-level names to multidiff.egg-info/top_level.txt
writing manifest file 'multidiff.egg-info/SOURCES.txt'
reading manifest file 'multidiff.egg-info/SOURCES.txt'
writing manifest file 'multidiff.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/multidiff
copying multidiff/Ansi.py -> build/lib/multidiff
copying multidiff/StdinController.py -> build/lib/multidiff
copying multidiff/FileController.py -> build/lib/multidiff
copying multidiff/StreamView.py -> build/lib/multidiff
copying multidiff/command_line_interface.py -> build/lib/multidiff
copying multidiff/__init__.py -> build/lib/multidiff
copying multidiff/Multidiffmodel.py -> build/lib/multidiff
copying multidiff/Render.py -> build/lib/multidiff
copying multidiff/SocketController.py -> build/lib/multidiff
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/multidiff
copying build/lib/multidiff/Ansi.py -> build/bdist.linux-x86_64/egg/multidiff
copying build/lib/multidiff/StdinController.py -> build/bdist.linux-x86_64/egg/multidiff
copying build/lib/multidiff/FileController.py -> build/bdist.linux-x86_64/egg/multidiff
copying build/lib/multidiff/StreamView.py -> build/bdist.linux-x86_64/egg/multidiff
copying build/lib/multidiff/command_line_interface.py -> build/bdist.linux-x86_64/egg/multidiff
copying build/lib/multidiff/__init__.py -> build/bdist.linux-x86_64/egg/multidiff
copying build/lib/multidiff/Multidiffmodel.py -> build/bdist.linux-x86_64/egg/multidiff
copying build/lib/multidiff/Render.py -> build/bdist.linux-x86_64/egg/multidiff
copying build/lib/multidiff/SocketController.py -> build/bdist.linux-x86_64/egg/multidiff
byte-compiling build/bdist.linux-x86_64/egg/multidiff/Ansi.py to Ansi.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/multidiff/StdinController.py to StdinController.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/multidiff/FileController.py to FileController.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/multidiff/StreamView.py to StreamView.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/multidiff/command_line_interface.py to command_line_interface.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/multidiff/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/multidiff/Multidiffmodel.py to Multidiffmodel.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/multidiff/Render.py to Render.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/multidiff/SocketController.py to SocketController.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying multidiff.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying multidiff.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying multidiff.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying multidiff.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying multidiff.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying multidiff.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/multidiff-0.1-py3.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing multidiff-0.1-py3.6.egg
Copying multidiff-0.1-py3.6.egg to /usr/local/lib/python3.6/dist-packages
Adding multidiff 0.1 to easy-install.pth file
Installing multidiff script to /usr/local/bin
Installed /usr/local/lib/python3.6/dist-packages/multidiff-0.1-py3.6.egg
Processing dependencies for multidiff==0.1
Finished processing dependencies for multidiff==0.1
And then tried to invoke the help function:
root@jj:~/multidiff# multidiff -h
Traceback (most recent call last):
File "/usr/local/bin/multidiff", line 11, in <module>
load_entry_point('multidiff==0.1', 'console_scripts', 'multidiff')()
File "/usr/local/lib/python3.6/dist-packages/multidiff-0.1-py3.6.egg/multidiff/command_line_interface.py", line 6, in main
File "/usr/lib/python3.6/argparse.py", line 1739, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/lib/python3.6/argparse.py", line 1771, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib/python3.6/argparse.py", line 1977, in _parse_known_args
start_index = consume_optional(start_index)
File "/usr/lib/python3.6/argparse.py", line 1917, in consume_optional
take_action(action, args, option_string)
File "/usr/lib/python3.6/argparse.py", line 1845, in take_action
action(self, namespace, argument_values, option_string)
File "/usr/lib/python3.6/argparse.py", line 1029, in __call__
parser.print_help()
File "/usr/lib/python3.6/argparse.py", line 2371, in print_help
self._print_message(self.format_help(), file)
File "/usr/lib/python3.6/argparse.py", line 2377, in _print_message
file.write(message)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 188-204: ordinal not in range(128)
root@jj:~/multidiff#
Can you help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.