diff options
author | Guido van Rossum <guido@python.org> | 1991-12-26 13:00:45 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-12-26 13:00:45 (GMT) |
commit | 2f242582f7db60a1a77b177ee33e746f04670b23 (patch) | |
tree | 3e605625d5c971c610265caf6d513ce691e350eb | |
parent | 9f7a956ffa0844e617d7adfe9afaf73d261c0fe9 (diff) | |
download | cpython-2f242582f7db60a1a77b177ee33e746f04670b23.zip cpython-2f242582f7db60a1a77b177ee33e746f04670b23.tar.gz cpython-2f242582f7db60a1a77b177ee33e746f04670b23.tar.bz2 |
Use ImportError; New class syntax.
-rw-r--r-- | Lib/lib-stdwin/DirList.py | 12 | ||||
-rwxr-xr-x | Lib/stdwin/DirList.py | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/Lib/lib-stdwin/DirList.py b/Lib/lib-stdwin/DirList.py index 2332e4e..20a0fe8 100644 --- a/Lib/lib-stdwin/DirList.py +++ b/Lib/lib-stdwin/DirList.py @@ -5,7 +5,7 @@ try: import posix, path os = posix -except NameError: +except ImportError: import mac, macpath os = mac path = macpath @@ -16,7 +16,7 @@ from Buttons import PushButton from WindowParent import WindowParent from HVSplit import HSplit, VSplit -class DirList() = VSplit(): +class DirList(VSplit): # def create(self, (parent, dirname)): self = VSplit.create(self, parent) @@ -32,7 +32,7 @@ class DirList() = VSplit(): return self # -class DirListWindow() = WindowParent(): +class DirListWindow(WindowParent): # def create(self, dirname): self = WindowParent.create(self, (dirname, (0, 0))) @@ -41,7 +41,7 @@ class DirListWindow() = WindowParent(): return self # -class SubdirButton() = PushButton(): +class SubdirButton(PushButton): # def drawpict(self, d): PushButton.drawpict(self, d) @@ -51,13 +51,13 @@ class SubdirButton() = PushButton(): window = DirListWindow().create(self.text) # -class FileButton() = PushButton(): +class FileButton(PushButton): # def up_trigger(self): stdwin.fleep() # -class ModuleButton() = FileButton(): +class ModuleButton(FileButton): # def drawpict(self, d): PushButton.drawpict(self, d) diff --git a/Lib/stdwin/DirList.py b/Lib/stdwin/DirList.py index 2332e4e..20a0fe8 100755 --- a/Lib/stdwin/DirList.py +++ b/Lib/stdwin/DirList.py @@ -5,7 +5,7 @@ try: import posix, path os = posix -except NameError: +except ImportError: import mac, macpath os = mac path = macpath @@ -16,7 +16,7 @@ from Buttons import PushButton from WindowParent import WindowParent from HVSplit import HSplit, VSplit -class DirList() = VSplit(): +class DirList(VSplit): # def create(self, (parent, dirname)): self = VSplit.create(self, parent) @@ -32,7 +32,7 @@ class DirList() = VSplit(): return self # -class DirListWindow() = WindowParent(): +class DirListWindow(WindowParent): # def create(self, dirname): self = WindowParent.create(self, (dirname, (0, 0))) @@ -41,7 +41,7 @@ class DirListWindow() = WindowParent(): return self # -class SubdirButton() = PushButton(): +class SubdirButton(PushButton): # def drawpict(self, d): PushButton.drawpict(self, d) @@ -51,13 +51,13 @@ class SubdirButton() = PushButton(): window = DirListWindow().create(self.text) # -class FileButton() = PushButton(): +class FileButton(PushButton): # def up_trigger(self): stdwin.fleep() # -class ModuleButton() = FileButton(): +class ModuleButton(FileButton): # def drawpict(self, d): PushButton.drawpict(self, d) |