mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Move boolcheck to PyShell
This commit is contained in:
parent
4a80a3ec21
commit
103ee91410
2 changed files with 4 additions and 7 deletions
|
@ -12,6 +12,8 @@ import traceback
|
||||||
import types
|
import types
|
||||||
import exceptions
|
import exceptions
|
||||||
|
|
||||||
|
import boolcheck
|
||||||
|
|
||||||
import linecache
|
import linecache
|
||||||
from code import InteractiveInterpreter
|
from code import InteractiveInterpreter
|
||||||
|
|
||||||
|
|
|
@ -27,20 +27,15 @@ idlelib = join(split(__file__)[0], 'idlelib')
|
||||||
if isdir(idlelib):
|
if isdir(idlelib):
|
||||||
sys.path.append(idlelib)
|
sys.path.append(idlelib)
|
||||||
|
|
||||||
# Make sure True, False, bool() builtins exist.
|
|
||||||
# - preserves 2.2 compatibility - 2.2.1 includes bool, 2.2 does not.
|
|
||||||
# - important for Mac OS X because it ships python 2.2
|
|
||||||
import boolcheck
|
|
||||||
|
|
||||||
# see if we are being asked to execute the subprocess code
|
# see if we are being asked to execute the subprocess code
|
||||||
if '-p' in sys.argv:
|
if '-p' in sys.argv:
|
||||||
# run expects only the port number in sys.argv
|
# run expects only the port number in sys.argv
|
||||||
sys.argv.remove('-p')
|
sys.argv.remove('-p')
|
||||||
|
|
||||||
# this module will become the namepsace used by the interactive
|
# this module will become the namespace used by the interactive
|
||||||
# interpreter; remove all variables we have defined.
|
# interpreter; remove all variables we have defined.
|
||||||
del sys, __file__, boolcheck, split, join, isdir
|
del sys, __file__, boolcheck, split, join, isdir
|
||||||
__import__('run').main()
|
__import__('run').main()
|
||||||
else:
|
else:
|
||||||
# Load idlelib/idle.py which starts the application.
|
# Load idlelib/idle.py which starts the application.
|
||||||
import idle
|
import idle
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue