Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2f24258

Browse files
committed
Use ImportError; New class syntax.
1 parent 9f7a956 commit 2f24258

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

Lib/lib-stdwin/DirList.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
try:
66
import posix, path
77
os = posix
8-
except NameError:
8+
except ImportError:
99
import mac, macpath
1010
os = mac
1111
path = macpath
@@ -16,7 +16,7 @@
1616
from WindowParent import WindowParent
1717
from HVSplit import HSplit, VSplit
1818

19-
class DirList() = VSplit():
19+
class DirList(VSplit):
2020
#
2121
def create(self, (parent, dirname)):
2222
self = VSplit.create(self, parent)
@@ -32,7 +32,7 @@ def create(self, (parent, dirname)):
3232
return self
3333
#
3434

35-
class DirListWindow() = WindowParent():
35+
class DirListWindow(WindowParent):
3636
#
3737
def create(self, dirname):
3838
self = WindowParent.create(self, (dirname, (0, 0)))
@@ -41,7 +41,7 @@ def create(self, dirname):
4141
return self
4242
#
4343

44-
class SubdirButton() = PushButton():
44+
class SubdirButton(PushButton):
4545
#
4646
def drawpict(self, d):
4747
PushButton.drawpict(self, d)
@@ -51,13 +51,13 @@ def up_trigger(self):
5151
window = DirListWindow().create(self.text)
5252
#
5353

54-
class FileButton() = PushButton():
54+
class FileButton(PushButton):
5555
#
5656
def up_trigger(self):
5757
stdwin.fleep()
5858
#
5959

60-
class ModuleButton() = FileButton():
60+
class ModuleButton(FileButton):
6161
#
6262
def drawpict(self, d):
6363
PushButton.drawpict(self, d)

Lib/stdwin/DirList.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
try:
66
import posix, path
77
os = posix
8-
except NameError:
8+
except ImportError:
99
import mac, macpath
1010
os = mac
1111
path = macpath
@@ -16,7 +16,7 @@
1616
from WindowParent import WindowParent
1717
from HVSplit import HSplit, VSplit
1818

19-
class DirList() = VSplit():
19+
class DirList(VSplit):
2020
#
2121
def create(self, (parent, dirname)):
2222
self = VSplit.create(self, parent)
@@ -32,7 +32,7 @@ def create(self, (parent, dirname)):
3232
return self
3333
#
3434

35-
class DirListWindow() = WindowParent():
35+
class DirListWindow(WindowParent):
3636
#
3737
def create(self, dirname):
3838
self = WindowParent.create(self, (dirname, (0, 0)))
@@ -41,7 +41,7 @@ def create(self, dirname):
4141
return self
4242
#
4343

44-
class SubdirButton() = PushButton():
44+
class SubdirButton(PushButton):
4545
#
4646
def drawpict(self, d):
4747
PushButton.drawpict(self, d)
@@ -51,13 +51,13 @@ def up_trigger(self):
5151
window = DirListWindow().create(self.text)
5252
#
5353

54-
class FileButton() = PushButton():
54+
class FileButton(PushButton):
5555
#
5656
def up_trigger(self):
5757
stdwin.fleep()
5858
#
5959

60-
class ModuleButton() = FileButton():
60+
class ModuleButton(FileButton):
6161
#
6262
def drawpict(self, d):
6363
PushButton.drawpict(self, d)

0 commit comments

Comments
 (0)