%edit -p<div><br></div><div>> Bring up an editor and execute the resulting code.</div><div><br></div><div>> -p: this will call the editor with the same data as the previous time it was used, regardless of how long ago (in your current session) it was.<br><div><br></div><div><a href="https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-edit">https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-edit</a></div><div><br></div><div>Something like this that calls $EDITOR with a temp file would be useful in the Python REPL as well.</div><div><br>On Wednesday, August 22, 2018, Antoine Pitrou <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 22 Aug 2018 09:38:57 -0700<br>
Chris Barker via Python-ideas<br>
<<a href="mailto:python-ideas@python.org">python-ideas@python.org</a>> wrote:<br>
> On Tue, Aug 21, 2018 at 3:07 PM, Jonathan Fine <<a href="mailto:jfine2358@gmail.com">jfine2358@gmail.com</a>> wrote:<br>
> <br>
> > > Maybe this is something Python's REPL should do?  <br>
> ><br>
> > Good idea.<br>
> >  <br>
> <br>
> I can't find (with very little effort) any documentation of this, but I<br>
> have a vague recollection that the core devs want to keep the built-in REPL<br>
> really simple -- more advanced features are for third party packages like<br>
> iPython.<br>
> <br>
> I tend to agree -- while something like this: "making the built-in repl<br>
> more friendly t copy-and-paste from examples" seems like a no brainer, the<br>
> fact is that there are a LOT of features that would make it easier for<br>
> newbies, and in the end, you'd end up with something like iPython.<br>
> <br>
> Honestly, Python does "suffer" a bit when in competition with commercial<br>
> products, in that it is a language (and an implementation of that<br>
> language), not an entire programming environment. So to use it, you need to<br>
> figure out which Editor or IDE you want to use, what debugger, etc.....<br>
> <br>
> And the REPL, while being pretty key to interactive data analysis, is not a<br>
> key feature of programming languages in general, even interpreted ones.<br>
> <br>
> So the solution is: use a third party solution for a complete environment<br>
> suitable for your needs. For instance, for people doing data analysis, I<br>
> recommend Anaconda -- then you get iPython and JUpyter (and Spyder) out of<br>
> the box -- and away we go.<br>
> <br>
> maybe it's worth a note t pyton-dev to confirm my vague impression (or some<br>
> more thorough googling for previous discussions) -- but I wouldn't put much<br>
> effort into ideas for the REPL without confirming that the core dev are<br>
> open to the concept.<br>
<br>
To me it sounds fine to improve the REPL.  Especially, being able to<br>
paste examples without effort was a sore point for me until I finally<br>
switched to IPython.  How much complexity and development work that<br>
would entail I don't know, though :-)<br>
<br>
Regards<br>
<br>
Antoine.<br>
<br>
<br>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
</blockquote></div></div>