mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
bpo-30166: Import command-line parsing modules only when needed. (#1293)
This commit is contained in:
parent
1c4670ea0c
commit
7e4db2f253
7 changed files with 20 additions and 12 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue