Use __init__ instead of init.
Also use CDDB_PATH and CDDB_WRITE_DIR environment variables in cddb.py.
diff --git a/Lib/irix5/cdplayer.py b/Lib/irix5/cdplayer.py
index 2685a42..5c2c95a 100755
--- a/Lib/irix5/cdplayer.py
+++ b/Lib/irix5/cdplayer.py
@@ -4,8 +4,8 @@
# Usage is as follows:
#
# import readcd
-# r = readcd.Readcd().init()
-# c = Cdplayer().init(r.gettrackinfo())
+# r = readcd.Readcd()
+# c = Cdplayer(r.gettrackinfo())
#
# Now you can use c.artist, c.title and c.track[trackno] (where trackno
# starts at 1). When the CD is not recognized, all values will be the empty
@@ -17,7 +17,7 @@
cdplayerrc = '.cdplayerrc'
class Cdplayer:
- def init(self, tracklist):
+ def __init__(self, tracklist):
import string
self.artist = ''
self.title = ''
@@ -38,7 +38,7 @@
import posix
f = open(posix.environ['HOME'] + '/' + cdplayerrc, 'r')
except IOError:
- return self
+ return
import regex
reg = regex.compile('^\\([^:]*\\):\t\\(.*\\)')
s = self.id + '.'
@@ -62,7 +62,6 @@
trackno = string.atoi(name[6:])
self.track[trackno] = value
f.close()
- return self
def write(self):
import posix