[Python-ideas] external editor commands in python REPL

David Mertz mertz at gnosis.cx
Mon May 13 18:43:05 CEST 2013


There are several external tools that "compete" in this space already.  For
example IPython and BPython (take a look at
http://wiki.python.org/moin/PythonEditors#Enhanced_Python_shells) for
descriptions of other ones also.  As well, a good number of text editors
have the capability of incorporating a Python shell within them, which is
kind of the "same thing inverted".

Rather than enhance the deliberately simple standard Python shell, I would
recommend using one of those 3rd party tools (or developing your own if you
see something missing in them).


On Mon, May 13, 2013 at 9:32 AM, Yury Selivanov <yselivanov.ml at gmail.com>wrote:

> Hi all,
>
> While working on a repl-like shell for one of our applications,
> I implemented a buffer-editing mechanism similar to PostgreSQL
> shell.  The idea is that you have special shell commands, starting
> with '\':
>
> - '\e' opens an external editor
> - '\r' clears the buffer
> - etc
>
> Playing with it for couple of days proved that it makes working with
> the REPL much more convenient.  Here's a quick screencast:
> https://dl.dropboxusercontent.com/u/21052/repl.mov
>
> And if anyone wants to try it, here is the hack:
> https://gist.github.com/1st1/5569467
> Run it under python 3: '$ python3 shell.py'
>
> I think it would be nice if we can include similar feature to the
> standard python REPL, as it makes it more convenient and OTOH
> starting python line with '\' is almost always illegal.
>
> -
> Yury
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>



-- 
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons.  Intellectual property is
to the 21st century what the slave trade was to the 16th.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130513/f356cc5e/attachment.html>


More information about the Python-ideas mailing list