diff --git a/erppeek.py b/erppeek.py index 77144a8..16ec5fe 100755 --- a/erppeek.py +++ b/erppeek.py @@ -1608,8 +1608,15 @@ def main(): if client.connect is not None: if not client.user: client.connect() - # Enter interactive mode - _interact(global_vars) + + try: + # First try IPython + import IPython + sys.argv = [sys.argv[0]] + return IPython.start_ipython(user_ns=global_vars) + except ImportError: + # Enter interactive mode + _interact(global_vars) if __name__ == '__main__': main()