IDLE 0.5 won't die (bug??)

Jim Callahan res031mu at gte.net
Sun May 7 08:05:12 EDT 2000


yep, that's done it, I had noticed this problem with pther apps I am wprking
on, just thought it seemed odd that it doesn't do that in IDLE 1.4.


Robert Cragie wrote:

> As IDLE is a Tkinter app. itself, you mustn't call root.mainloop(). Remove
> the root.mainloop() and it should work OK.
>
> Note that there may also be other subtle problems using IDLE with Tkinter
> apps. I believe it's basically to do with event handling and which widget
> the events end up at.
>
> Robert
>
> Jim Callahan <res031mu at gte.net> wrote in message
> news:3912B392.F00D7D66 at gte.net...
> | When I run the code from the Frames in TK message (code after error) as
> | a script in IDLE 0.5 (using ctrl-F5) , and close the resulting window,
> | IDLE won't do anything else, and I have to run a script which does a
> | print "Howdy" or something of the sort to get my prompt back.  IDLE the
> | reports this Traceback:
> |
> | Hello World!
> | Traceback (innermost last):
> |   File "C:\Program Files\Python\Tools\idle-0.5\printHi.py", line 1, in ?
> |
> |     print "Hello World!"
> |   File "C:\PROGRA~1\PYTHON\TOOLS\IDLE-0.5\PyShell.py", line 637, in
> | write
> |     self.shell.write(s, self.tags)
> |   File "C:\PROGRA~1\PYTHON\TOOLS\IDLE-0.5\PyShell.py", line 628, in
> | write
> |     raise KeyboardInterrupt
> | KeyboardInterrupt:
> |
> | ****the code that kills my IDLE**********************************
> | from Tkinter import *
> |
> | def create_frames(master):
> |     # relief and borderwidth arguments make frames visible
> |     frame1 = Frame(master, relief='sunken', borderwidth=2)
> |     frame2 = Frame(master, relief='sunken', borderwidth=2)
> |
> |     frame1.place(relx=0, rely=0, relwidth=1, relheight=0.65)
> |     frame2.place(relx=0, rely=0.65, relwidth=1, relheight=0.35)
> |
> |     # put something in the frames
> |     label1 = Label(frame1, text="Hello")
> |     label1.grid(row=0, column=0)
> |     label2 = Label(frame2, text="World!")
> |     label2.grid(row=0, column=0)
> |
> | root = Tk()
> | create_frames(root)
> | root.mainloop()
> |
> |
> |
> | --
> |
> | Jim Callahan                                   cobol4ever at altavista.net
> |
> |

--
You should have received a copy of the GNU General Public License
along with this email; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Jim Callahan                                   cobol4ever at altavista.net





More information about the Python-list mailing list