summaryrefslogtreecommitdiffstats
path: root/Tools/idle/FrameViewer.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-04-29 10:23:27 (GMT)
committerGuido van Rossum <guido@python.org>2003-04-29 10:23:27 (GMT)
commit57cd21fde285d25021ee978cd09ed58159166bf8 (patch)
tree57936b5a729c1219ae080d518832b9e17aa219ec /Tools/idle/FrameViewer.py
parent19691360c7a8c203d1a94f6074036e810a6f0527 (diff)
downloadcpython-57cd21fde285d25021ee978cd09ed58159166bf8.zip
cpython-57cd21fde285d25021ee978cd09ed58159166bf8.tar.gz
cpython-57cd21fde285d25021ee978cd09ed58159166bf8.tar.bz2
Checking in IDLEFORK exactly as it appears in the idlefork CVS.
On a branch, for now.
Diffstat (limited to 'Tools/idle/FrameViewer.py')
-rw-r--r--Tools/idle/FrameViewer.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/Tools/idle/FrameViewer.py b/Tools/idle/FrameViewer.py
deleted file mode 100644
index 2ce0935..0000000
--- a/Tools/idle/FrameViewer.py
+++ /dev/null
@@ -1,38 +0,0 @@
-from repr import Repr
-from Tkinter import *
-
-class FrameViewer:
-
- def __init__(self, root, frame):
- self.root = root
- self.frame = frame
- self.top = Toplevel(self.root)
- self.repr = Repr()
- self.repr.maxstring = 60
- self.load_variables()
-
- def load_variables(self):
- row = 0
- if self.frame.f_locals is not self.frame.f_globals:
- l = Label(self.top, text="Local Variables",
- borderwidth=2, relief="raised")
- l.grid(row=row, column=0, columnspan=2, sticky="ew")
- row = self.load_names(self.frame.f_locals, row+1)
- l = Label(self.top, text="Global Variables",
- borderwidth=2, relief="raised")
- l.grid(row=row, column=0, columnspan=2, sticky="ew")
- row = self.load_names(self.frame.f_globals, row+1)
-
- def load_names(self, dict, row):
- names = dict.keys()
- names.sort()
- for name in names:
- value = dict[name]
- svalue = self.repr.repr(value)
- l = Label(self.top, text=name)
- l.grid(row=row, column=0, sticky="w")
- l = Entry(self.top, width=60, borderwidth=0)
- l.insert(0, svalue)
- l.grid(row=row, column=1, sticky="w")
- row = row+1
- return row