now a patch fixing it I have no good feeling about, but it works:

in PyShell.py in
    def restart_subprocess(self):

insert in section:
"
        console.showprompt()
        # restart subprocess debugger

        # (-Patch)
        # making additional modules available in IDLE directly after
re-start of it:
        self.runsource("import os; from path import path")
        # (Patch-)

        if debug:
"
This will provide the modules also after restart.

Hope this will not crash elsewhere because of unexpected effects of
inserting the runsource() method at that point in the code without any other
commands which are maybe necessary to keep IDLE consistent.

So IDLE experts, HELP PLEASE !!!

Claudio

<[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Okey I tried what you recommended
>
> My C:\Python24\sitecustomize.py looks like this:
>
> # sitecustomize.py
> import os
> from btools import *
>
> When I enter
> C:\Python24>C:\Python24\pythonw.exe C:\Python24\Lib\idlelib\idle.py -r
> C:\Python24\sitecustomize.py
>
> in commad propmt IDLE starts up and automatically imports 'os' and all
> names from my btools folder. So far so good. But when I hit Ctrl+F6 and
> restart Python Shell both 'os' and names from btools are gone!
>
> When I work with IDLE I typically start a new file (File/New Window)
> and when I have written the code I hit (Ctrl+S) to Save and F5 to run.
> This restarts Python Shell and my names from btools are gone. It's no
> solution if I'm forced to go back to command prompt and enter the long
> sequance again.
>
> Bob
>


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to