[Idle-dev] Restart Shell and Run Module (was Erik Thompson's opinions on IDLE)

Douglas S. Blank dblank at brynmawr.edu
Fri Jan 26 16:17:39 CET 2007

Tal Einat wrote:


> Another feature I would add is an "execfile in shell" menu item. This 
> avoids module import/reload issues when you're just trying out code, and 
> so is more convenient when developing.
> Comments please?

This is something that we needed in the courses that we are teaching 
with Python and robots; it is too painful to have to reconnect to the 
robot each time you load new code. Of course, this is only needed when 
you are running with subprocesses. This makes running with subprocesses 
and without subprocesses more consistent with each other. The relevant 
diffs are below. (Let me know if you want more information.)


Differences for ScriptBinding.py:

<                  ('Run Module', '<<run-module>>'),
<                  ('Restart Shell and Run Module', 
<                  ]), ]
 >                  ('Run Module', '<<run-module>>'), ]), ]
<     def restart_and_run_module_event(self, event):
<         self.run_module_event(event, 1)
<     def run_module_event(self, event, restart = 0):
 >     def run_module_event(self, event):
<         if PyShell.use_subprocess and restart:
 >         if PyShell.use_subprocess:

Differences for config-extensions.def:

< restart-and-run-module=<Alt-Key-F5>
< [AutoComplete]
< enable=1
< popupwait=2000
< [AutoComplete_cfgBindings]
< force-open-completions=<Control-Key-space>
< [AutoComplete_bindings]
< autocomplete=<Key-Tab>
< try-open-completions=<KeyRelease-period> <KeyRelease-slash> 

More information about the IDLE-dev mailing list