Giter VIP home page Giter VIP logo

Comments (7)

aroberge avatar aroberge commented on July 23, 2024

They are included:

Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32                                          
Type "help", "copyright", "credits" or "license" for more information.                                                                
>>> from friendly_traceback import public_api                                                                                         
>>> public_api.__all__                                                                                                                
['cache', 'check_syntax', 'exec_code', 'highlight_source', 'exclude_file_from_traceback', 'is_excluded_file', 'include_file_in_traceba
ck', '__version__', 'explain', 'install', 'uninstall', 'is_installed', 'get_output', 'set_formatter', 'set_lang', 'get_lang', 'set_lev
el', 'get_level', 'set_stream', 'get_stream', 'clear_traceback', 'copy_traceback_info', 'show_traceback_info_again']                  

I too have looked at seeing if I could easily use Friendly-traceback with Thonny, but have not been able to - at least not yet.

Edit: sorry, I mentioned Thonny while you mentioned PyDev ... because I saw your name and just assumed it was related to Thonny.

from friendly.

aivarannamaa avatar aivarannamaa commented on July 23, 2024

Now I noticed the make_public trick, but as PyDev doesn't execute the module, this is not visible for the code completer. BTW, jedi completer used in Thonny doesn't see through it either. I suspect MyPy and other static analysis tools will also stumble on it.

I was able to integrate friendly_traceback into Thonny. I'll send you the details when I'm done with the configuration part. I was talking about PyDev, because I'm developing Thonny in it.

from friendly.

aroberge avatar aroberge commented on July 23, 2024

I didn't realize that using a decorator would cause problems. I just saw this as an easy way to avoid forgetting to include some functions. If needed, I can stop using this and explicitly add the name in __all__: it would be a minor edit for me to do.

from friendly.

aroberge avatar aroberge commented on July 23, 2024

Also, in case you install from pypi.org, note that run_program has been removed from version 0.0.26 (latest version on pypi) but is still present in the repository as I didn't commit the corresponding changes; https://github.com/aroberge/friendly-traceback/blob/master/friendly_traceback/public_api.py#L250

If it is needed for Thonny, I can put it back in.

from friendly.

aivarannamaa avatar aivarannamaa commented on July 23, 2024

I used following methods

  • set_level
  • set_lang
  • exclude_file_from_traceback
  • explain(redirect="capture")
  • get_output

The result is in Thonny's master and the instructions are here: thonny/thonny#1028

If you are happy with this, then I'll try to make a release before holidays.

from friendly.

aroberge avatar aroberge commented on July 23, 2024

from friendly.

aivarannamaa avatar aivarannamaa commented on July 23, 2024

Great!

from friendly.

Related Issues (20)

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.