summaryrefslogtreecommitdiffstats
path: root/Lib/tabnanny.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-05-04 05:17:47 (GMT)
committerGitHub <noreply@github.com>2017-05-04 05:17:47 (GMT)
commit7e4db2f253c555568d56177c2fd083bcf8f88d34 (patch)
treeaa2606f09d5b1095bb20573ed6b0be38ca4d6f33 /Lib/tabnanny.py
parent1c4670ea0cc3d208121af11b9b973e6bb268e570 (diff)
downloadcpython-7e4db2f253c555568d56177c2fd083bcf8f88d34.zip
cpython-7e4db2f253c555568d56177c2fd083bcf8f88d34.tar.gz
cpython-7e4db2f253c555568d56177c2fd083bcf8f88d34.tar.bz2
bpo-30166: Import command-line parsing modules only when needed. (#1293)
Diffstat (limited to 'Lib/tabnanny.py')
-rwxr-xr-xLib/tabnanny.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/tabnanny.py b/Lib/tabnanny.py
index bfb670c..7973f26 100755
--- a/Lib/tabnanny.py
+++ b/Lib/tabnanny.py
@@ -22,7 +22,6 @@ __version__ = "6"
import os
import sys
-import getopt
import tokenize
if not hasattr(tokenize, 'NL'):
raise ValueError("tokenize.NL doesn't exist -- tokenize module too old")
@@ -40,6 +39,8 @@ def errprint(*args):
sys.stderr.write("\n")
def main():
+ import getopt
+
global verbose, filename_only
try:
opts, args = getopt.getopt(sys.argv[1:], "qv")