Comments (7)
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.
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.
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.
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.
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.
from friendly.
Great!
from friendly.
Related Issues (20)
- Using new information for SyntaxError for Python 3.10 HOT 2
- Using with the logging module. HOT 3
- NameError on missing stdlib imports HOT 2
- Internet connection lost, or server unreachable HOT 6
- Use SITE_PACKAGES to short paths
- MemoryError HOT 5
- tox won't pass HOT 14
- TypeError: dict.update() argument after ** must be a mapping, not tuple HOT 2
- formatting placeholder issue in attribute_error.py HOT 2
- AssertionError HOT 3
- TypeError measuring uncalled function HOT 1
- SyntaxError with no explanation HOT 3
- ValueError: month must be in 1..12 HOT 4
- Improved location information
- Introduce Friendly.help() HOT 1
- Remove more()
- ValueError: invalid literal for int() with base 10: '' HOT 7
- Future work: more complete search of "bad lines" HOT 1
- Make rich optional HOT 7
- TypeError cases from bugs.python.org HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from friendly.