[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python.el, shell-send-region and exception handling

From: Fabián Ezequiel Gallina
Subject: Re: python.el, shell-send-region and exception handling
Date: Sat, 17 Jan 2015 22:31:15 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Yuri D'Elia <address@hidden> writes:

> Is there a way to have python-shell-send-region (and friends) to detect
> uncaught exceptions at the python prompt?
> I would like to be notified somehow of python exceptions either in the
> minibuffer or by splitting the window and showing python's output.
> Currently, uncaught exceptions simply go unnoticed if you don't have the
> output buffer visible.
> This is done currently in python-mode.el, but I couldn't find an
> alternative in python.el.
> If I wanted to implement such a feature, how would you suggest to
> implement it?
> Thanks.
Hi Yuri,

A simple way to achieve this would be to create a comint output filter
function.  The `python-pdbtrack-comint-output-filter-function` is a nice
guide to start.  You would check with a regexp for the occurrence of an
exception and act accordingly.

I plan to add this to python.el.  If you'd like your implementation to
be considered feel free to propose it, otherwise expect my approach to
land in the next few weeks.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]