summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2010-08-23 20:47:04 +0000
committerSol Jerome <sol.jerome@gmail.com>2010-08-27 08:28:39 -0500
commitd6b3084cbc96307c44ebfd734f88d2692a85c6c7 (patch)
tree588dcdc8c5963e95a13d9873fc6aadadc93ab241 /src/sbin
parentb2f66ed8f6325fbe2d2b00887c250501e9e35128 (diff)
downloadbcfg2-d6b3084cbc96307c44ebfd734f88d2692a85c6c7.tar.gz
bcfg2-d6b3084cbc96307c44ebfd734f88d2692a85c6c7.tar.bz2
bcfg2-d6b3084cbc96307c44ebfd734f88d2692a85c6c7.zip
bcfg2-info: Add IPython support (Patch from Jeff Strunk) for Ticket #921
Signed-off-by: Sol Jerome <sol.jerome@gmail.com> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@6034 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-info7
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, _):
"""