[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:

[snip]

> 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.)

-Doug

Differences for ScriptBinding.py:

50,52c50
<                  ('Run Module', '<<run-module>>'),
<                  ('Restart Shell and Run Module', 
'<<restart-and-run-module>>'),
<                  ]), ]
---
 >                  ('Run Module', '<<run-module>>'), ]), ]
132,135c130
<     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):
152c147
<         if PyShell.use_subprocess and restart:
---
 >         if PyShell.use_subprocess:

Differences for config-extensions.def:

51d50
< restart-and-run-module=<Alt-Key-F5>
82,90d80
<
< [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> 
<KeyRelease-backslash>


More information about the IDLE-dev mailing list