diff options
author | Sjoerd Mullender <sjoerd@acm.org> | 1993-11-08 15:10:43 (GMT) |
---|---|---|
committer | Sjoerd Mullender <sjoerd@acm.org> | 1993-11-08 15:10:43 (GMT) |
commit | b2e358d433e0ddbfc870d1a6ce12e7917388c2fe (patch) | |
tree | b504539fed3fec7238cb7b58c717126acc66555b /Lib/plat-irix5/cdplayer.py | |
parent | e65cce5eec23812d77a54095209c923937cc3c92 (diff) | |
download | cpython-b2e358d433e0ddbfc870d1a6ce12e7917388c2fe.zip cpython-b2e358d433e0ddbfc870d1a6ce12e7917388c2fe.tar.gz cpython-b2e358d433e0ddbfc870d1a6ce12e7917388c2fe.tar.bz2 |
Use __init__ instead of init.
Also use CDDB_PATH and CDDB_WRITE_DIR environment variables in cddb.py.
Diffstat (limited to 'Lib/plat-irix5/cdplayer.py')
-rwxr-xr-x | Lib/plat-irix5/cdplayer.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/plat-irix5/cdplayer.py b/Lib/plat-irix5/cdplayer.py index 2685a42..5c2c95a 100755 --- a/Lib/plat-irix5/cdplayer.py +++ b/Lib/plat-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 @@ class Cdplayer: 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 @@ class Cdplayer: trackno = string.atoi(name[6:]) self.track[trackno] = value f.close() - return self def write(self): import posix |