[Patches] [ python-Patches-575774 ] python-mode patch for ipython support

noreply@sourceforge.net noreply@sourceforge.net
Sun, 30 Jun 2002 15:28:38 -0700


Patches item #575774, was opened at 2002-06-30 22:28
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=575774&group_id=5470

Category: Demos and tools
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Alexander Schmolck (aschmolck)
Assigned to: Nobody/Anonymous (nobody)
Summary: python-mode patch for ipython support

Initial Comment:
This patch makes the prompt and traceback recognition
mechanisms a bit more flexible to allow easy adaptation
for ipython (in lieu of the normal python shell). The
seperate file ipython.el (which I assume will end up in
the ipython distribution) then enables
py-execute-region, py-up-exception etc. to work just as
well for ipython (which means ipython works just as
well under python mode as the standard python shell). I
also added something to ipython.el to convert ipython
session bits to something that looks like normal
interactive session bits. This, together with ipython's
ability to directly execute such strings (by
auto-removing leading '>>>'s) should make for very
convinient doctest development (I had orginally planned
to patch python-mode to incorporate such functionality
because I found the manual reediting a bit tiresome).

Slightly off-topic, I also have a feature request:
executing a whole file ends up creating a temporary
file which is instead executed. I think it would be
much nicer if the actual file itself where executed
with execfile, because otherwise pdb ends up pointing
to the "wrong" (i.e. the temporary) buffer. It is
really easy to forget about this and edit this
temporary file during a debugging session and as a
consequence inadvertenly loose changes. This situation
crops up quite often, if one uses ipython's really
nifty feature to toggle pdb activation on exceptions
(or hacks up something equivalent for python), which is
an extremely efficient way to quickly debug and test
one's program. I would have added a patch, but some
restructuring seemed necessary, and it wasn't
immediately clear to me in which way this should be done.

alex

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=575774&group_id=5470