diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/sbin/bcfg2-info | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index fefeec79e..6732d8830 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -134,7 +134,12 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core): sh.push(command) if interactive: print("dropping to python interpreter; press ^D to resume") - sh.interact() + try: + import IPython + shell = IPython.Shell.IPShell(argv=[], user_ns=locals()) + shell.mainloop() + except ImportError: + sh.interact() def do_quit(self, _): """ |