Code Monkey home page Code Monkey logo

multidiff's People

Contributors

aaaaalbert avatar juhakivekas avatar utkarsh1308 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multidiff's Issues

UnicodeEncodeError after fresh install

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?

Please consider naming the commandline multidiff

  • for sure should not have .py suffix since implementation detail is not important
  • would make it easier to get started using (I installed multidiff so I use multidiff instead of figuring out what is the cmdline entry point)

Consider making output as wide as the terminal

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

please provide setup.py

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.