[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: Daniel Pimentel
Subject: Re: python.el, shell-send-region and exception handling
Date: Sun, 18 Jan 2015 09:05:37 -0300
User-agent: Roundcube Webmail/1.0.4

On 2015-01-17 22:31, address@hidden wrote:
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?


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.

Thank you for it.
Daniel Pimentel (d4n1)

reply via email to

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