diff options
author | Guido van Rossum <guido@python.org> | 2000-05-08 17:25:17 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-05-08 17:25:17 (GMT) |
commit | 813008e506def2e19fdb44a55f9e91e749bc1869 (patch) | |
tree | 08d56a938b5136f26b0a7875cff094ac2791b9f1 /Lib/lib-stdwin/DirList.py | |
parent | e298c3018cf5613aa3d8af4a5cc5652f1659f12b (diff) | |
download | cpython-813008e506def2e19fdb44a55f9e91e749bc1869.zip cpython-813008e506def2e19fdb44a55f9e91e749bc1869.tar.gz cpython-813008e506def2e19fdb44a55f9e91e749bc1869.tar.bz2 |
Deleting all stdwin library modules.
Diffstat (limited to 'Lib/lib-stdwin/DirList.py')
-rw-r--r-- | Lib/lib-stdwin/DirList.py | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/Lib/lib-stdwin/DirList.py b/Lib/lib-stdwin/DirList.py deleted file mode 100644 index 446d33b..0000000 --- a/Lib/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))) - # |