Function calling problem

rainer2207 at rainer2207 at
Sun Aug 29 11:57:46 CEST 1999

Can someone please explain what's wrong with this code? I've tried to
call the function quit(self) but I get an error. What's wrong here?

from Tkinter import *
import sys, Dialog

class Interface:

	def __init__(self, master): = Menu(master, tearoff=0, name="menu")

		self.frame = Frame(master, width="15c", height="10c",
bd=2, relief="sunken")
		self.frame.pack(fill="both", expand=1)

		m = Menu(, tearoff=0)"File", menu=m, underline=0)

		n = Menu(m, tearoff=0)
		m.add_cascade(label="New", menu=n, underline=0)
		n.add_command(label="RDF Schema", underline=4)
		n.add_command(label="RDF Metadata", underline=4)

		o = Menu(m, tearoff=0)
		m.add_cascade(label="Open", menu=n, underline=0)
		o.add_command(label="RDF Schema", underline=5)
		o.add_command(label="RDF Metadata", underline=5,

		m.add_command(label="Save", underline=0)
		m.add_command(label="Save As...", underline=5)
		m.add_command(label="Close", underline=0)
		m.add_command(label="Exit", underline=0,

		m = Menu(m, tearoff=0)"Edit", menu=m, underline=0)
		m.add_command(label="Cut", underline=2)
		m.add_command(label="Copy", underline=0)
		m.add_command(label="Paste", underline=0)

		m = Menu(m, tearoff=0)"Help", menu=m, underline=0)
		a = Menu(m, tearoff=0)
		m.add_command(label="About", underline=0)

	def quit(self):


root = Tk()
inter = Interface(root)

Sent via
Share what you know. Learn what you don't.

More information about the Python-list mailing list