bpo-30166: Import command-line parsing modules only when needed. (#1293)

This commit is contained in:
Serhiy Storchaka 2017-05-04 08:17:47 +03:00 committed by GitHub
parent 1c4670ea0c
commit 7e4db2f253
7 changed files with 20 additions and 12 deletions

View file

@ -7,7 +7,6 @@
import sys
import traceback
import argparse
from codeop import CommandCompiler, compile_command
__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact",
@ -303,6 +302,8 @@ def interact(banner=None, readfunc=None, local=None, exitmsg=None):
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-q', action='store_true',
help="don't print version and copyright messages")