◐ Shell
clean mode source ↗

Message 349433 - Python tracker

The import-on-demand would be executed in the Shell's execution process namespace, so it works with the current implementation.  I said above that this puts names 'where they don't belong', but I feel a little differently now.  A variant idea might be to execute all imports as entered in the editor in the shell.

A pie-in-the-sky idea is to give each editor its own execution process and execute each line as entered, or something like that.  But I have put off researching what other editors do until we get what we have working better.