[Tutor] Segmentation Fault Problem

Anschau Gesicht anschau at shaw.ca
Fri Jan 2 14:41:49 EST 2004


I continue on my endless(and seemingly futile)attempt to learn a
programming language.  Currently I'm attempting small scripts in
Python/Tkinter.  The particular script is a textbox script at follows

#!/usr/lib/python2.2

from Tkinter import *
from ScrolledText import *
import sys

def die(event):
  sys.exit(0)

root = Tk()
f = Frame(root)
f.pack(expand=1, fill=BOTH)
button = Button(f, width=25)
button["text"] = "Button"
button.bind("<Button>",die)
button.pack()

st = ScrolledText(f,background="white")
st.pack()

root.mainloop()

Very simple and straight forward but if I mouseclick in the text window
the program seg faults.  Can anyone tell me why?  As an aside, I cannot
use idle (a text editor) because it seg faults everytime I try to
initialize.  

Eve

P.S. My platform is RedHat Linux v 9 and Python v2.2



More information about the Tutor mailing list