[Idle-dev] auto-loading at shell start and shell restart

Mark Summerfield M.N.SUMMERFIELD.405728 at swansea.ac.uk
Fri Feb 17 16:28:27 CET 2006


I love using IDLE, both for experimenting with python and for

But every time I start IDLE for calculations I have to type in:

    from __future__ import division
    from math import *

which would be bearable if I only had to do it once a day... but when I
experiment I often have my code in a separate python file, so I do:

    import mycode

then do my experiments, then, when I've hit problems or want to move
forward, I do Shell|Restart, and use ^P a few times to get the import
line back. Which is fine, except that if I've done a lot between imports
and I want to switch between testing mycode.py and some calculations I
end up having to type

    from __future__ import division
    from math import *

time after time.

I wish there was some standard way (i.e. in Options) of having a list of
python commands to issue whenever the shell is started or restarted.


Mark Summerfield

More information about the IDLE-dev mailing list