summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/pyshell.py
diff options
context:
space:
mode:
authorterryjreedy <tjreedy@udel.edu>2017-06-11 04:34:20 (GMT)
committerGitHub <noreply@github.com>2017-06-11 04:34:20 (GMT)
commitc0ef607c52e58e94693fbedb27f2813bc3fed8fa (patch)
treef1f5d258ca4f85a22c159df651234dd2c6d5ff84 /Lib/idlelib/pyshell.py
parent556cddba770fc9f85f133e52993dc618caa347c0 (diff)
downloadcpython-c0ef607c52e58e94693fbedb27f2813bc3fed8fa.zip
cpython-c0ef607c52e58e94693fbedb27f2813bc3fed8fa.tar.gz
cpython-c0ef607c52e58e94693fbedb27f2813bc3fed8fa.tar.bz2
[3.6] bpo-30166: backport pyshell changes (GH 1293) (#2098)
(cherry-pick IDLE pyshell change from 7e4db2f)
Diffstat (limited to 'Lib/idlelib/pyshell.py')
-rwxr-xr-xLib/idlelib/pyshell.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py
index dd6c997..5b0e5b2 100755
--- a/Lib/idlelib/pyshell.py
+++ b/Lib/idlelib/pyshell.py
@@ -18,12 +18,10 @@ if TkVersion < 8.5:
raise SystemExit(1)
from code import InteractiveInterpreter
-import getopt
-import io
import linecache
import os
import os.path
-from platform import python_version, system
+from platform import python_version
import re
import socket
import subprocess
@@ -32,14 +30,12 @@ import time
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
@@ -1372,6 +1368,11 @@ echo "import sys; print(sys.argv)" | idle - "foobar"
"""
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)