Here a correction of the code snippet: console.text.mark_gravity("restart", "left") # (-Patch) # making additional modules available in IDLE directly after re-start of it: self.runsource("import os; from path import path") time.sleep(0.1) # (Patch-) console.showprompt()
# restart subprocess debugger I have no slightest idea why does it make a difference. What would make much more sense for me is to wait until self.tkconsole.executing is False but this resulted in an endless loop ... Claudio "Claudio Grondi" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > > <[EMAIL PROTECTED]> schrieb im Newsbeitrag > news:[EMAIL PROTECTED] > > I did as you suggested, however > > > > after I make a new File (File/New Window) and save and then run (F5) I > > get the following alert > > > > The Python Shell is already executing a command; please waith until it > > is finished > > > > I also get the error message > > > > Traceback (most recent call last): > > File "<pyshell#1>", line 1, in -toplevel- > > import os; from path import path > > ImportError: No module named path > > >>> > > > > Bob > > > Sure you have to replace "import os; from path import path" > with " from btools import *", than you avoid the error message > but not the problem you have got with the message box. > A "solution" to the problem with the message box may be as follows: > > " > 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") > time.sleep(0.1) > # (Patch-) > > if debug: > " > If 0.1 doesn't work on your system, just increase the value, but this will > delay the response. > e.g. 0.001 doesn't work for me, but 0.1 does (Intel Pentium 4 running at 2.8 > GHz). > > Claudio > > -- http://mail.python.org/mailman/listinfo/python-list