Back to index

python3.2  3.2.2
Classes | Functions | Variables
idlelib.Percolator Namespace Reference

Classes

class  Percolator

Functions

def main

Variables

 name

Function Documentation

Definition at line 54 of file Percolator.py.

00054 
00055 def main():
00056     import tkinter as Tk
00057     class Tracer(Delegator):
00058         def __init__(self, name):
00059             self.name = name
00060             Delegator.__init__(self, None)
00061         def insert(self, *args):
00062             print(self.name, ": insert", args)
00063             self.delegate.insert(*args)
00064         def delete(self, *args):
00065             print(self.name, ": delete", args)
00066             self.delegate.delete(*args)
00067     root = Tk.Tk()
00068     root.wm_protocol("WM_DELETE_WINDOW", root.quit)
00069     text = Tk.Text()
00070     text.pack()
00071     text.focus_set()
00072     p = Percolator(text)
00073     t1 = Tracer("t1")
00074     t2 = Tracer("t2")
00075     p.insertfilter(t1)
00076     p.insertfilter(t2)
00077     root.mainloop() # click close widget to continue...
00078     p.removefilter(t2)
00079     root.mainloop()
00080     p.insertfilter(t2)
00081     p.removefilter(t1)
00082     root.mainloop()

Here is the call graph for this function:


Variable Documentation

Definition at line 58 of file Percolator.py.