[Python-ideas] REPL features

Wes Turner wes.turner at gmail.com
Wed Aug 22 18:03:22 EDT 2018


%doctest_mode works like the Python REPL (with '>>>' prompts and no pretty
printing)

https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-doctest_mode

On Wednesday, August 22, 2018, Wes Turner <wes.turner at gmail.com> wrote:

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


More information about the Python-ideas mailing list