summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-05-24 19:02:32 -0600
committerkotfu <kotfu@kotfu.net>2018-05-24 19:02:32 -0600
commit190fecb34ac91e25f64615f378d6d59ef6d77de8 (patch)
tree3cfa590653af8b7570bd4073384467d2ca736fa0 /cmd2/cmd2.py
parentdb881e13796abdaabe6cb7d4121389c36e9aa407 (diff)
downloadcmd2-git-190fecb34ac91e25f64615f378d6d59ef6d77de8.tar.gz
Make changes requested in PR #413
Diffstat (limited to 'cmd2/cmd2.py')
-rwxr-xr-xcmd2/cmd2.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index f4ed8d08..f480b3ae 100755
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -22,7 +22,13 @@ is used in place of `print`.
Git repository on GitHub at https://github.com/python-cmd2/cmd2
"""
-# many imports are lazy-loaded when they are needed
+# This module has many imports, quite a few of which are only
+# infrequently utilized. To reduce the initial overhead of
+# import this module, many of these imports are lazy-loaded
+# i.e. we only import the module when we use it
+# For example, we don't import the 'traceback' module
+# until the perror() function is called and the debug
+# setting is True
import argparse
import cmd
import collections
@@ -33,7 +39,7 @@ import platform
import re
import shlex
import sys
-from typing import Callable, List, Optional, Union, Tuple
+from typing import Callable, List, Union, Tuple
import pyperclip