summaryrefslogtreecommitdiffstats
path: root/Demo/sgi
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-08-18 14:16:21 (GMT)
committerGuido van Rossum <guido@python.org>1992-08-18 14:16:21 (GMT)
commit7ff90ef71491d4ff5a22146510bc9a51d521973d (patch)
tree0d16daa3599f9829d4e07aa1696e59202e5abdaa /Demo/sgi
parent843d153f996882fe24884a34f98ca97b176ff6ee (diff)
downloadcpython-7ff90ef71491d4ff5a22146510bc9a51d521973d.zip
cpython-7ff90ef71491d4ff5a22146510bc9a51d521973d.tar.gz
cpython-7ff90ef71491d4ff5a22146510bc9a51d521973d.tar.bz2
Adapt to new syntax and don't print garbage on self.close().
Diffstat (limited to 'Demo/sgi')
-rwxr-xr-xDemo/sgi/video/VFile.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Demo/sgi/video/VFile.py b/Demo/sgi/video/VFile.py
index 1711b4b..9415e2c 100755
--- a/Demo/sgi/video/VFile.py
+++ b/Demo/sgi/video/VFile.py
@@ -50,7 +50,7 @@ def conv_rgb8(rgb,d1,d2):
# xorigin, yorigin
# fallback
-class VinFile():
+class VinFile:
# init() and initfp() raise Error if the header is bad.
# init() raises whatever open() raises if the file can't be opened.
@@ -60,7 +60,7 @@ class VinFile():
return self.initfp(sys.stdin, filename)
return self.initfp(open(filename, 'r'), filename)
- def initfp(self, (fp, filename)):
+ def initfp(self, fp, filename):
self.colormapinited = 0
self.magnify = 1.0
self.xorigin = self.yorigin = 0
@@ -400,7 +400,7 @@ def grab_hsv(w, h, pf):
# Notably it will accept almost any garbage and write it to the video
# output file
#
-class VoutFile():
+class VoutFile:
def init(self, filename):
if filename == '-':
return self.initfp(sys.stdout, filename)
@@ -421,7 +421,7 @@ class VoutFile():
def close(self):
self.fp.close()
- self.initfp(None, None)
+ self = self.initfp(None, None)
def setinfo(self, values):
self.format, self.width, self.height, self.packfactor,\