On 14 Nov 2015 11:12, "Paul Moore" <p.f.moore@gmail.com> wrote:
>
> On 13 November 2015 at 23:38, Nathaniel Smith <njs@pobox.com> wrote:
> > But details of R's execution model make this easier to do.
>
> Indeed. I don't know how R works, but Python's module caching
> behaviour would mean this would be full of surprising and confusing
> corner cases ("I upgraded but I'm still getting the old version" being
> the simplest and most obvious one).
>
> > Maybe it could be supported for the special case of installing new packages with no upgrades

Maybe it could prompt the user that the interpreter will need to be restarted for the changes to take effect. IDLE runs the interactive interpreter in a separate process so it could restart the subprocess without closing the GUI (after prompting the user with a restart/continue dialogue).

I'm not sure if the standard interpreter would be able to relaunch itself but it could at least exit and tell the user to restart (after a yes/no question in the terminal). The command could also be limited to the when the interpreter is in interactive mode.

How it works in the terminal is less important to me than how it works in IDLE though; being able to teach how to use Python through IDLE (deferring discussion of terminals etc) is useful for introductory programming classes.

--
Oscar