Uniformly replaced init() functions by __init__() constructors.
A few simple things seem to work, I haven't tested it thouroughly
though...
diff --git a/Demo/sgi/video/LiveVideoIn.py b/Demo/sgi/video/LiveVideoIn.py
index 4e000b1..661ea73 100755
--- a/Demo/sgi/video/LiveVideoIn.py
+++ b/Demo/sgi/video/LiveVideoIn.py
@@ -33,7 +33,7 @@
# Note that the data has to be cropped unless vw and vh are
# just right for the video board (vw:vh == 4:3 and vh even).
- def init(self, pktmax, vw, vh, type):
+ def __init__(self, pktmax, vw, vh, type):
if not have_video:
raise RuntimeError, 'no video available'
if vw % 4 != 0:
@@ -72,13 +72,12 @@
## if not self.justright:
## print 'Want:', self.width, 'x', self.height,
## print '; grab:', self.realwidth, 'x', self.realheight
- return self
# Change the size of the video being displayed.
def resizevideo(self, vw, vh):
self.close()
- self = self.init(self.pktmax, vw, vh, self.type)
+ self.__init__(self.pktmax, vw, vh, self.type)
# Remove an instance.
# This turns off continuous capture.
@@ -103,7 +102,7 @@
# - data is a piece of data
# The dimensions of data are:
# - pixel depth = 1 byte
- # - scan line width = self.width (the vw argument to init())
+ # - scan line width = self.width (the vw argument to __init__())
# - number of scan lines = self.lpp (PKTMAX / vw)
def getnextpacket(self):