import sys
import traceback
-import argparse
from codeop import CommandCompiler, compile_command
__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact",
if __name__ == "__main__":
+ import argparse
+
parser = argparse.ArgumentParser()
parser.add_argument('-q', action='store_true',
help="don't print version and copyright messages")
]
import __future__
-import argparse
import difflib
import inspect
import linecache
def _test():
+ import argparse
+
parser = argparse.ArgumentParser(description="doctest runner")
parser.add_argument('-v', '--verbose', action='store_true', default=False,
help='print very verbose output for all tests')
"SimpleHTTPRequestHandler", "CGIHTTPRequestHandler",
]
-import argparse
import copy
import datetime
import email.utils
sys.exit(0)
if __name__ == '__main__':
+ import argparse
+
parser = argparse.ArgumentParser()
parser.add_argument('--cgi', action='store_true',
help='Run as CGI Server')
raise SystemExit(1)
from code import InteractiveInterpreter
-import getopt
import linecache
import os
import os.path
-from platform import python_version, system
+from platform import python_version
import re
import socket
import subprocess
import tokenize
import warnings
-from idlelib import testing # bool value
from idlelib.colorizer import ColorDelegator
from idlelib.config import idleConf
from idlelib import debugger
from idlelib import debugger_r
from idlelib.editor import EditorWindow, fixwordbreaks
from idlelib.filelist import FileList
-from idlelib import macosx
from idlelib.outwin import OutputWindow
from idlelib import rpc
from idlelib.run import idle_formatwarning, PseudoInputFile, PseudoOutputFile
"""
def main():
+ import getopt
+ from platform import system
+ from idlelib import testing # bool value
+ from idlelib import macosx
+
global flist, root, use_subprocess
capture_warnings(True)
import sys
-import os
import time
import marshal
-from optparse import OptionParser
__all__ = ["run", "runctx", "Profile"]
self.t = self.get_time()
self.simulate_call('profiler')
- # Heavily optimized dispatch routine for os.times() timer
+ # Heavily optimized dispatch routine for time.process_time() timer
def trace_dispatch(self, frame, event, arg):
timer = self.timer
#****************************************************************************
def main():
+ import os
+ from optparse import OptionParser
+
usage = "profile.py [-o output_file_path] [-s sort] scriptfile [arg] ..."
parser = OptionParser(usage=usage)
parser.allow_interspersed_args = False
import os
import sys
-import getopt
import tokenize
if not hasattr(tokenize, 'NL'):
raise ValueError("tokenize.NL doesn't exist -- tokenize module too old")
sys.stderr.write("\n")
def main():
+ import getopt
+
global verbose, filename_only
try:
opts, args = getopt.getopt(sys.argv[1:], "qv")
r.write_results(show_missing=True, coverdir="/tmp")
"""
__all__ = ['Trace', 'CoverageResults']
-import argparse
+
import linecache
import os
import re
callers=self._callers)
def main():
+ import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--version', action='version', version='trace 2.0')