summaryrefslogtreecommitdiffstats
path: root/Demo/sgi/video/Vedit.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-12-17 15:11:41 (GMT)
committerGuido van Rossum <guido@python.org>1993-12-17 15:11:41 (GMT)
commit21a3ff9d5d9d8cad0bc52cb603df93d38e139840 (patch)
tree533c4f8e2a23ecaa6099c868035b1463881ff1a7 /Demo/sgi/video/Vedit.py
parent96b608cf6ddb4c7b670c15a365ed8b14accd5d37 (diff)
downloadcpython-21a3ff9d5d9d8cad0bc52cb603df93d38e139840.zip
cpython-21a3ff9d5d9d8cad0bc52cb603df93d38e139840.tar.gz
cpython-21a3ff9d5d9d8cad0bc52cb603df93d38e139840.tar.bz2
Uniformly replaced init() functions by __init__() constructors.
A few simple things seem to work, I haven't tested it thouroughly though...
Diffstat (limited to 'Demo/sgi/video/Vedit.py')
-rwxr-xr-xDemo/sgi/video/Vedit.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Demo/sgi/video/Vedit.py b/Demo/sgi/video/Vedit.py
index 43a67c8..228cabc 100755
--- a/Demo/sgi/video/Vedit.py
+++ b/Demo/sgi/video/Vedit.py
@@ -32,7 +32,7 @@ def main():
for o, a in opts:
if o == '-q':
qsize = string.atoi(a)
- ed = Editor().init(qsize)
+ ed = Editor(qsize)
if args[0:]:
ed.open_input(args[0])
if args[1:]:
@@ -43,7 +43,7 @@ def main():
class Editor:
- def init(self, qsize):
+ def __init__(self, qsize):
self.qsize = qsize
self.vin = None
self.vout = None
@@ -53,7 +53,6 @@ class Editor:
flp.create_full_form(self, formdef)
self.form.show_form(FL.PLACE_SIZE, FL.TRUE, 'Vedit')
fl.set_event_call_back(self.do_event)
- return self
def do_event(self, dev, val):
if dev == DEVICE.REDRAW:
@@ -215,7 +214,7 @@ class Editor:
basename = os.path.split(filename)[1]
title = 'in: ' + basename
try:
- vin = Viewer.InputViewer().init(filename, title)
+ vin = Viewer.InputViewer(filename, title)
except:
self.err('Can\'t open input file', filename)
return
@@ -244,7 +243,7 @@ class Editor:
basename = os.path.split(filename)[1]
title = 'out: ' + basename
try:
- vout = Viewer.OutputViewer().init(filename, \
+ vout = Viewer.OutputViewer(filename, \
title, self.qsize)
except:
self.err('Can\'t open output file', filename)