GithubHelp home page GithubHelp logo

better-exceptions-hook's People

Contributors

paradoxxxzero 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

Watchers

 avatar  avatar  avatar  avatar

Forkers

acidburn0zzz

better-exceptions-hook's Issues

Not working in Python3?

I ran

pip install better-exceptions-hook

For both Python2 and Python3, and then ran the following file (bla.py):

a = "hello"
b = "world"
assert a == b

Here's the output:

erez@localhost ~ $ python2 bla.py 
Traceback (most recent call last):
  File "bla.py", line 4, in <module>
    assert a == b
           │    └ 'world'
           └ 'hello'
AssertionError: assert a == b

erez@localhost ~ [1]$ python3 bla.py 
Traceback (most recent call last):
  File "bla.py", line 4, in <module>
    assert a == b
AssertionError

Any idea why?

Setup instructions

I'm unfamiliar with import hooks and the standard library documentation does not mention where to place .pth files. How would I go about installing this?

Thanks, this sounds very promising!

Avoid need for separate module

You don't actually need to provide a separate better_exceptions_hook module, your pth file can just contain

import sys; exec('try:\n import better_exceptions\nexcept Exception: pass')

(The sys import is just a placeholder needed for the pth file to work.)

I got the trick from https://github.com/ionelmc/python-hunter/blob/master/setup.py#L47; see https://github.com/anntzer/mplcursors/blob/master/setup.py for a self-contained solution. (Here the embedded string is so short that you can probably just hard-code it.)

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.