diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2003-05-28 01:47:46 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2003-05-28 01:47:46 (GMT) |
commit | 62df0448850000739edd1df8b4c0e702119d476e (patch) | |
tree | 7b951a9bf7b3c2d85d1ee60772087132ce0e2a16 /Lib/idlelib/PyShell.py | |
parent | f7c822073e8b0b899343e2f222778ff1eb37b2c6 (diff) | |
download | cpython-62df0448850000739edd1df8b4c0e702119d476e.zip cpython-62df0448850000739edd1df8b4c0e702119d476e.tar.gz cpython-62df0448850000739edd1df8b4c0e702119d476e.tar.bz2 |
Added a config-main General option to delete sys.exitfunc. The default
is not to do that. VPython and student environment support.
M PyShell.py
M config-main.def
M run.py
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r-- | Lib/idlelib/PyShell.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index ed353c9..a11eaa5 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -312,13 +312,14 @@ class ModifiedInterpreter(InteractiveInterpreter): InteractiveInterpreter.__init__(self, locals=locals) self.save_warnings_filters = None self.restarting = False + self.subprocess_arglist = self.build_subprocess_arglist() port = 8833 rpcclt = None rpcpid = None def spawn_subprocess(self): - args = self.build_subprocess_arglist() + args = self.subprocess_arglist self.rpcpid = os.spawnv(os.P_NOWAIT, args[0], args) def build_subprocess_arglist(self): @@ -326,10 +327,12 @@ class ModifiedInterpreter(InteractiveInterpreter): # Maybe IDLE is installed and is being accessed via sys.path, # or maybe it's not installed and the idle.py script is being # run from the IDLE source directory. + del_exitf = idleConf.GetOption('main', 'General', 'delete-exitfunc', + default=False, type='bool') if __name__ == 'idlelib.PyShell': - command = "__import__('idlelib.run').run.main()" + command = "__import__('idlelib.run').run.main(" + `del_exitf` +")" else: - command = "__import__('run').main()" + command = "__import__('run').main(" + `del_exitf` + ")" return [sys.executable] + w + ["-c", command, str(self.port)] def start_subprocess(self): |