diff options
author | Guido van Rossum <guido@python.org> | 1997-09-09 03:39:21 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-09-09 03:39:21 (GMT) |
commit | d7500fcbb4d0257f3bcd0c87d17ee61f3b1545e8 (patch) | |
tree | db4a6e4835e04851df721eb4595d7172d8e05c34 /Lib/stdwin/DirList.py | |
parent | 045e688f6fc06c87cc93f84e42fb4767a04ba559 (diff) | |
download | cpython-d7500fcbb4d0257f3bcd0c87d17ee61f3b1545e8.zip cpython-d7500fcbb4d0257f3bcd0c87d17ee61f3b1545e8.tar.gz cpython-d7500fcbb4d0257f3bcd0c87d17ee61f3b1545e8.tar.bz2 |
These directories renamed: tkinter -> lib-tk, stdwin -> lib-stdwin.
Diffstat (limited to 'Lib/stdwin/DirList.py')
-rwxr-xr-x | Lib/stdwin/DirList.py | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/Lib/stdwin/DirList.py b/Lib/stdwin/DirList.py deleted file mode 100755 index 446d33b..0000000 --- a/Lib/stdwin/DirList.py +++ /dev/null @@ -1,58 +0,0 @@ -# DirList -- Directory Listing widget - -# XXX Displays messy paths when following '..' - -import os -import stdwin, rect -from stdwinevents import * -from Buttons import PushButton -from WindowParent import WindowParent -from HVSplit import HSplit, VSplit - -class DirList(VSplit): - # - def create(self, parent, dirname): - self = VSplit.create(self, parent) - names = os.listdir(dirname) - for name in names: - if os.path.isdir(os.path.join(dirname, name)): - fullname = os.path.join(dirname, name) - btn = SubdirButton().definetext(self, fullname) - elif name[-3:] == '.py': - btn = ModuleButton().definetext(self, name) - else: - btn = FileButton().definetext(self, name) - return self - # - -class DirListWindow(WindowParent): - # - def create(self, dirname): - self = WindowParent.create(self, dirname, (0, 0)) - child = DirList().create(self, dirname) - self.realize() - return self - # - -class SubdirButton(PushButton): - # - def drawpict(self, d): - PushButton.drawpict(self, d) - d.box(rect.inset(self.bounds, (3, 1))) - # - def up_trigger(self): - window = DirListWindow().create(self.text) - # - -class FileButton(PushButton): - # - def up_trigger(self): - stdwin.fleep() - # - -class ModuleButton(FileButton): - # - def drawpict(self, d): - PushButton.drawpict(self, d) - d.box(rect.inset(self.bounds, (1, 3))) - # |