Commit Graph

40 Commits

Author SHA1 Message Date
Delgan
f10e1fb154
Align "format_traceback" output with built-in function (#64) 2019-01-10 23:51:03 +01:00
Josh Junon
d5f56d8136 0.2.2 2019-01-10 15:17:39 +01:00
Josh Junon
0b13582973 0.2.1 2018-01-16 16:19:52 +01:00
Josh Junon
62a1690097 0.2.0 2018-01-16 16:17:20 +01:00
Delgan
f926bcccc2 Add automatic hook based on an environment variable 2017-10-19 12:01:29 +02:00
Delgan
c9c2ce9d9c Add a way to use better_exceptions functions without side effects
Importing 'better_exceptions' automatically replaces the default sys.excepthook and
add an handler to the root logger.
This is very useful in most cases, but sometimes the user may want to use library
functions without any side effects.

Two packages can be published: the first contains all the functions of the library,
and the second uses these functions to automatically set up the better exception system.
The user can choose the package he wants to import, and there is no code repetition
in the repository

The core functions had to be encapsulated into a class so that user can still modify
global parameters to his convenience.
2017-09-13 09:06:45 +02:00
Delgan
35eaebff0b Fix raw codes appearing with Python 3 on Windows cmd
Colorama does not wrap the 'buffer' attributes of streams, so writing
to it would not convert ANSI codes on Windows.
The workaround is to use '.write()' without encoding the string,
and rather wrap the stream used by Colorama to encode substrings
which are sent once win32 call are made.
2017-09-11 09:59:20 +02:00
Delgan
712c2dbdfc Add __version__ to top level module 2017-09-10 22:25:43 +02:00
TaoBeier
821b9e4555 fix indentation and change nodes iterable 2017-09-10 22:11:09 +02:00
Kevin Woldt
4ab6076c3e using relative imports to support sub packaging (#30) 2017-05-03 12:52:37 -07:00
Josh Junon
d807d03afc use new PY3 variable instead of system check 2017-04-24 15:51:18 -07:00
cold
cd378ffe7d Fix Non-ASCII exceptions UnicodeDecodeError (#33)
* Fix Non-ASCII exceptions UnicodeDecodeError

Fix some code includes Non-ASCII characters will cause `UnicodeDecodeError`

* Add test encoding & regenerate test data
2017-04-24 15:48:26 -07:00
Josh Junon
f6f74b8ea7 add logger patching (closes #21) 2017-03-28 14:12:14 -07:00
Josh Junon
3c51839251 allow for either dict or module __builtins__ (fixes #26) 2017-03-28 12:56:32 -07:00
Josh Junon
096281cbae clarify usage message when default interpreter is used 2017-03-26 09:23:30 -07:00
Josh Junon
f548b84f21 add special case to remove runcode() calls 2017-03-24 01:18:39 -07:00
Josh Junon
6db81f32c6 omit last frame if we created it 2017-03-24 01:14:15 -07:00
Josh Junon
bcac52d39b define final_source in case there isn't a frame 2017-03-24 01:05:49 -07:00
Josh Junon
2a9b86d8d3 ignore dummy exception frame if tb not present 2017-03-24 00:58:00 -07:00
Josh Junon
9024677a77 allow for non-whitespace characters to surround strings 2017-03-24 00:46:15 -07:00
Josh Junon
7fabe8725f fix encoding issues and accidental skipping when compact -c is used 2017-03-24 00:35:28 -07:00
Josh Junon
c7e306d309 fix -c parsing when code is the last program argument 2017-03-24 00:06:18 -07:00
Josh Junon
f1ba394557 decode output from spawn() prior to shlex.split-ting it 2017-03-23 23:58:18 -07:00
Josh Junon
df512de997 sort colored ast nodes based on their col_offset (fixes #18) 2017-03-23 23:46:46 -07:00
Josh Junon
46363e1061 read command line from system if using -c 2017-03-23 23:31:11 -07:00
Josh Junon
2d0978b0f1 add interactive mode 2017-03-23 21:04:03 -07:00
Josh Junon
a53ef3c58a fix line munging (fixes #11) 2017-03-23 11:40:15 -07:00
JiuLi Gao
f5defff2b5 Update funciton get_frame_information (#14)
We could use `inspect.getframeinfo()` method to parse all info of a frame that we need.
2017-03-23 11:39:51 -07:00
JiuLi Gao
5df6bdef70 Update __init__.py (#13)
typo error
2017-03-22 20:48:27 -07:00
Josh
87413759cc use better color detection methods and add color support on windows
Makes color detection a little more intuitive and adds proper Windows support via colorama (only installed on Windows).
2017-03-22 18:41:02 -07:00
Josh
222d871323 use system encoding and detect non-unicode encoding (#9)
use system encoding and detect non-unicode encoding
2017-03-22 12:30:36 -07:00
Josh Junon
a81b768fd6 don't use bolded angle box character (fixes #6) 2017-03-22 10:26:45 -07:00
Florian Mounier
3801a070ec Remove useless strip parameter 2017-03-22 09:12:37 -07:00
Florian Mounier
6c22d2b1a4 Use linecache 2017-03-22 09:12:37 -07:00
Florian Mounier
4765a593c0 Fix assert special handling. Should probably fix #2 and address #3 2017-03-22 11:19:45 +01:00
Florian Mounier
07619f7523 Python 3 support 2017-03-22 10:24:37 +01:00
Josh Junon
57f3b80220 sort values by column position 2017-03-12 04:54:09 -07:00
Josh Junon
23c57171b6 add max length in formatted values 2017-03-12 04:44:08 -07:00
Josh Junon
222dc49bfe fix situations where the AST cannot be parsed 2017-03-12 04:39:36 -07:00
Josh Junon
baf2198a7b initial commit 2017-03-12 04:22:31 -07:00