Author terry.reedy
Recipients Lita.Cho, Ramchandra Apte, ezio.melotti, jesstess, kbk, orsenthil, rhettinger, terry.reedy
Date 2014-05-28.22:50:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401317424.42.0.325028596802.issue17172@psf.upfronthosting.co.za>
In-reply-to
Content
0. My general interest is in running external programs and in particular, for this issue, python modules intended to be run as main. Some other scripts I would like to be able to easily launch from Idle include List/test.test_idle.py, Tools/Scripts/patchcheck.py, and a possible 'idle_tour.py' (in progress) that would be a live demo/tutorial of some Idle widgets and functions. I would like the list to be user-configurable for other choices.

1. As with any python script, turtledemo can be run now, without modification, in a separate process, asynchronously, from within idle, by loading the file into an editor window and selecting Run / Run Module or hitting F5. Communication and cleanup issues are already solved. Having output appear in the Shell window obviates the need for a separate console window to receive output, keeps it visible even after the external process quits. One thing that remains impossible is to run two separate modules at the same time.

A possible inplementation of 'easy to launch' would be to load turtledemo.py into an editor window and generate a '<<run-module>>' event.

This, of course, does more than is needed and has the danger of a user accidentally overwriting the original module code. An alternative would be a stripped down version of ScriptBinding.ScriptBinding._run_module_event.

2. This feature should be implemented as an extension rather than being 'baked' into Idle. Run-module itself is an extension (ScriptBinding.py), as are several other functions (see config-extensions.def). A possible name would be 'external_module.py'

An advantage of an extension is that it can be turned off if someone, such as a college course instructor, does not like it present. This change could be made before considering point 1.

I would like to have one extension that could handle multiple external modules listed in the config entry. After reading config-bindings.def and some of the extension files, especially RstripExtension.py, I believe this is possible. However, I would expect to add this after there is a patch just for turtledemo.

3. If Run were on the menu of Shell windows, that would be the appropriate place for 'run external module' as opposed 'run editor module'. This would be especially true with multiple entries.
History
Date User Action Args
2014-05-28 22:50:24terry.reedysetrecipients: + terry.reedy, rhettinger, kbk, orsenthil, ezio.melotti, jesstess, Ramchandra Apte, Lita.Cho
2014-05-28 22:50:24terry.reedysetmessageid: <1401317424.42.0.325028596802.issue17172@psf.upfronthosting.co.za>
2014-05-28 22:50:24terry.reedylinkissue17172 messages
2014-05-28 22:50:22terry.reedycreate