diff options
author | kotfu <kotfu@kotfu.net> | 2018-05-06 14:05:22 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-05-06 14:07:21 -0600 |
commit | 6e49661f310bf88279c298326f236f0edd01791e (patch) | |
tree | 9f1d858af1f91aaa2d86129a48feb46f50f36b62 /cmd2/cmd2.py | |
parent | 728455e729ea05ead204491d7c2c37d09d5e1268 (diff) | |
download | cmd2-git-6e49661f310bf88279c298326f236f0edd01791e.tar.gz |
Defer import of InteractiveConsole
Diffstat (limited to 'cmd2/cmd2.py')
-rwxr-xr-x | cmd2/cmd2.py | 2 |
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())') |