470,590 Members | 2,650 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,590 developers. It's quick & easy.

restoring the default completer in IPython

This should probably go to the IPython list, but since I am not
subscribed I will try my luck here.
Basically, I want to embed IPython inside a command line interpreter
based on cmd.Cmd, in this

import cmd, IPython

class Cmd(cmd.Cmd):
def do_ipython(self, arg):
ipython = IPython.Shell.IPShellEmbed()
def do_EOF(self, arg):
return 1


It works, however when I exit from the IPython shell (after giving the
ipython command) the Cmd
class is still using the IPython readline completer, not the original
one. By looking at the source
code of IPShellEmbed I see that there is a
method .restore_system_completer() which is
called, but it seems to be not working. I am probably doing something
wrong, can somebody knowledgeable on IPython internals share some
light on that? TIA,

Michele Simionato

Aug 21 '07 #1
0 839

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Yaroslav Bulatov | last post: by
3 posts views Thread by Dave Merrill | last post: by
1 post views Thread by Jeremy Jones | last post: by
4 posts views Thread by Koray Bostancż | last post: by
1 post views Thread by Michael Tobis | last post: by
reply views Thread by James Stroud | last post: by
5 posts views Thread by Lou Pecora | last post: by
1 post views Thread by Karlo Lozovina | last post: by
8 posts views Thread by T. Crane | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.