summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-05-06 14:05:22 -0600
committerkotfu <kotfu@kotfu.net>2018-05-06 14:07:21 -0600
commit6e49661f310bf88279c298326f236f0edd01791e (patch)
tree9f1d858af1f91aaa2d86129a48feb46f50f36b62 /cmd2/cmd2.py
parent728455e729ea05ead204491d7c2c37d09d5e1268 (diff)
downloadcmd2-git-6e49661f310bf88279c298326f236f0edd01791e.tar.gz
Defer import of InteractiveConsole
Diffstat (limited to 'cmd2/cmd2.py')
-rwxr-xr-xcmd2/cmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 9428afb3..52dfc901 100755
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -44,7 +44,6 @@ import sys
import tempfile
import traceback
from typing import Callable, List, Optional, Union, Tuple
-from code import InteractiveConsole
import pyperclip
@@ -2794,6 +2793,7 @@ Usage: Usage: unalias [-a] name [name ...]
self.pystate['self'] = self
localvars = self.pystate
+ from code import InteractiveConsole
interp = InteractiveConsole(locals=localvars)
interp.runcode('import sys, os;sys.path.insert(0, os.getcwd())')