[Python-mode] [ python-mode-Patches-783254 ] python-mode patch for ipython support

SourceForge.net noreply at sourceforge.net
Tue Jun 7 05:14:21 CEST 2005


Patches item #783254, was opened at 2003-08-04 22:26
Message generated for change (Comment added) made by montanaro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=581351&aid=783254&group_id=86916

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Skip Montanaro (montanaro)
>Assigned to: Skip Montanaro (montanaro)
Summary: python-mode patch for ipython support

Initial Comment:
migrating #575774 from the python project.

Original submission:

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.



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

>Comment By: Skip Montanaro (montanaro)
Date: 2005-06-06 22:14

Message:
Logged In: YES 
user_id=44345

Last of the parts of this were added in 4.75.


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=581351&aid=783254&group_id=86916


More information about the Python-mode mailing list