Have you seen IPython?<br><br><div class="gmail_quote">On Mon, May 13, 2013 at 9:32 AM, Yury Selivanov <span dir="ltr"><<a href="mailto:yselivanov.ml@gmail.com" target="_blank">yselivanov.ml@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
While working on a repl-like shell for one of our applications,<br>
I implemented a buffer-editing mechanism similar to PostgreSQL<br>
shell.  The idea is that you have special shell commands, starting<br>
with '\':<br>
<br>
- '\e' opens an external editor<br>
- '\r' clears the buffer<br>
- etc<br>
<br>
Playing with it for couple of days proved that it makes working with<br>
the REPL much more convenient.  Here's a quick screencast:<br>
<a href="https://dl.dropboxusercontent.com/u/21052/repl.mov" target="_blank">https://dl.dropboxusercontent.com/u/21052/repl.mov</a><br>
<br>
And if anyone wants to try it, here is the hack:<br>
<a href="https://gist.github.com/1st1/5569467" target="_blank">https://gist.github.com/1st1/5569467</a><br>
Run it under python 3: '$ python3 shell.py'<br>
<br>
I think it would be nice if we can include similar feature to the<br>
standard python REPL, as it makes it more convenient and OTOH<br>
starting python line with '\' is almost always illegal.<br>
<br>
-<br>
Yury<br>
<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)