summaryrefslogtreecommitdiffstats
path: root/Lib/plat-irix6
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-04-17 08:48:32 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-04-17 08:48:32 (GMT)
commit9d72bb452bced3a100f07f8a9e30c4495a9ec41a (patch)
treec39762a764fcc16f2cfc42e2504e58ff31e159e6 /Lib/plat-irix6
parentff11334927ee616d765b54a3851016b76a20bcec (diff)
downloadcpython-9d72bb452bced3a100f07f8a9e30c4495a9ec41a.zip
cpython-9d72bb452bced3a100f07f8a9e30c4495a9ec41a.tar.gz
cpython-9d72bb452bced3a100f07f8a9e30c4495a9ec41a.tar.bz2
Remove functions in string module that are also string methods. Also remove:
* all calls to functions in the string module (except maketrans) * everything from stropmodule except for maketrans() which is still used
Diffstat (limited to 'Lib/plat-irix6')
-rw-r--r--Lib/plat-irix6/cddb.py9
-rw-r--r--Lib/plat-irix6/cdplayer.py7
2 files changed, 7 insertions, 9 deletions
diff --git a/Lib/plat-irix6/cddb.py b/Lib/plat-irix6/cddb.py
index bfdf57d..bdd2ec3 100644
--- a/Lib/plat-irix6/cddb.py
+++ b/Lib/plat-irix6/cddb.py
@@ -14,14 +14,14 @@
# You can then use c.write() to write out the changed values to the
# .cdplayerrc file.
-import string, posix, os
+import posix, os
_cddbrc = '.cddb'
_DB_ID_NTRACKS = 5
_dbid_map = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ@_=+abcdefghijklmnopqrstuvwxyz'
def _dbid(v):
if v >= len(_dbid_map):
- return string.zfill(v, 2)
+ return v.zfill(2)
else:
return _dbid_map[v]
@@ -164,11 +164,10 @@ class Cddb:
for i in range(nidtracks):
start, length = tracklist[i]
self.id = self.id + _dbid(length[0]) + _dbid(length[1])
- self.toc = string.zfill(ntracks, 2)
+ self.toc = ntracks.zfill(2)
for track in tracklist:
start, length = track
- self.toc = self.toc + string.zfill(length[0], 2) + \
- string.zfill(length[1], 2)
+ self.toc = self.toc + length[0].zfill(2) + length[1].zfill(2)
def write(self):
import posixpath
diff --git a/Lib/plat-irix6/cdplayer.py b/Lib/plat-irix6/cdplayer.py
index a2be8b4..493527f 100644
--- a/Lib/plat-irix6/cdplayer.py
+++ b/Lib/plat-irix6/cdplayer.py
@@ -18,7 +18,6 @@ cdplayerrc = '.cdplayerrc'
class Cdplayer:
def __init__(self, tracklist):
- import string
self.artist = ''
self.title = ''
if type(tracklist) == type(''):
@@ -29,11 +28,11 @@ class Cdplayer:
int(tracklist[i+2:i+4]))))
tracklist = t
self.track = [None] + [''] * len(tracklist)
- self.id = 'd' + string.zfill(len(tracklist), 2)
+ self.id = 'd' + repr(len(tracklist)).zfill(2)
for track in tracklist:
start, length = track
- self.id = self.id + string.zfill(length[0], 2) + \
- string.zfill(length[1], 2)
+ self.id = self.id + repr(length[0]).zfill(2) + \
+ repr(length[1]).zfill(2)
try:
import posix
f = open(posix.environ['HOME'] + '/' + cdplayerrc, 'r')