diff options
author | Guido van Rossum <guido@python.org> | 2007-02-09 05:37:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-02-09 05:37:30 (GMT) |
commit | be19ed77ddb047e02fe94d142181062af6d99dcc (patch) | |
tree | 70f214e06554046fcccbadeb78665f25e07ce965 /Lib/plat-irix5 | |
parent | 452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff) | |
download | cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.zip cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.gz cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.bz2 |
Fix most trivially-findable print statements.
There's one major and one minor category still unfixed:
doctests are the major category (and I hope to be able to augment the
refactoring tool to refactor bona fide doctests soon);
other code generating print statements in strings is the minor category.
(Oh, and I don't know if the compiler package works.)
Diffstat (limited to 'Lib/plat-irix5')
-rwxr-xr-x | Lib/plat-irix5/cddb.py | 8 | ||||
-rwxr-xr-x | Lib/plat-irix5/cdplayer.py | 2 | ||||
-rwxr-xr-x | Lib/plat-irix5/flp.py | 26 | ||||
-rwxr-xr-x | Lib/plat-irix5/panel.py | 32 |
4 files changed, 34 insertions, 34 deletions
diff --git a/Lib/plat-irix5/cddb.py b/Lib/plat-irix5/cddb.py index 7b2711f..19a9d42 100755 --- a/Lib/plat-irix5/cddb.py +++ b/Lib/plat-irix5/cddb.py @@ -89,7 +89,7 @@ class Cddb: break match = reg.match(line) if not match: - print 'syntax error in ' + file + print('syntax error in ' + file) continue name1, name2, value = match.group(1, 2, 3) if name1 == 'album': @@ -101,17 +101,17 @@ class Cddb: if not self.toc: self.toc = value if self.toc != value: - print 'toc\'s don\'t match' + print('toc\'s don\'t match') elif name2 == 'notes': self.notes.append(value) elif name1[:5] == 'track': try: trackno = int(name1[5:]) except strings.atoi_error: - print 'syntax error in ' + file + print('syntax error in ' + file) continue if trackno > ntracks: - print 'track number %r in file %r out of range' % (trackno, file) + print('track number %r in file %r out of range' % (trackno, file)) continue if name2 == 'title': self.track[trackno] = value diff --git a/Lib/plat-irix5/cdplayer.py b/Lib/plat-irix5/cdplayer.py index 1c0168f..b3fc8a4 100755 --- a/Lib/plat-irix5/cdplayer.py +++ b/Lib/plat-irix5/cdplayer.py @@ -51,7 +51,7 @@ class Cdplayer: line = line[l:] match = reg.match(line) if not match: - print 'syntax error in ~/' + cdplayerrc + print('syntax error in ~/' + cdplayerrc) continue name, value = match.group(1, 2) if name == 'title': diff --git a/Lib/plat-irix5/flp.py b/Lib/plat-irix5/flp.py index 83a22b6..b04ecf3 100755 --- a/Lib/plat-irix5/flp.py +++ b/Lib/plat-irix5/flp.py @@ -66,7 +66,7 @@ def checkcache(filename): return None try: if fp.read(4) != MAGIC: - print 'flp: bad magic word in cache file', cachename + print('flp: bad magic word in cache file', cachename) return None cache_mtime = rdlong(fp) file_mtime = getmtime(filename) @@ -122,7 +122,7 @@ def writecache(filename, forms): try: fp = open(cachename, 'w') except IOError: - print 'flp: can\'t create cache file', cachename + print('flp: can\'t create cache file', cachename) return # Never mind fp.write('\0\0\0\0') # Seek back and write MAGIC when done wrlong(fp, getmtime(filename)) @@ -145,8 +145,8 @@ def writecache(filename, forms): def freeze(filename): forms = parse_forms(filename) altforms = _pack_cache(forms) - print 'import flp' - print 'flp._internal_cache[', repr(filename), '] =', altforms + print('import flp') + print('flp._internal_cache[', repr(filename), '] =', altforms) # # Internal: create the data structure to be placed in the cache @@ -426,7 +426,7 @@ def test(): if len(sys.argv) == 2: forms = parse_forms(sys.argv[1]) t1 = time.time() - print 'parse time:', 0.001*(t1-t0), 'sec.' + print('parse time:', 0.001*(t1-t0), 'sec.') keys = forms.keys() keys.sort() for i in keys: @@ -434,18 +434,18 @@ def test(): elif len(sys.argv) == 3: form = parse_form(sys.argv[1], sys.argv[2]) t1 = time.time() - print 'parse time:', round(t1-t0, 3), 'sec.' + print('parse time:', round(t1-t0, 3), 'sec.') _printform(form) else: - print 'Usage: test fdfile [form]' + print('Usage: test fdfile [form]') def _printform(form): f = form[0] objs = form[1] - print 'Form ', f.Name, ', size: ', f.Width, f.Height, ' Nobj ', f.Numberofobjects + print('Form ', f.Name, ', size: ', f.Width, f.Height, ' Nobj ', f.Numberofobjects) for i in objs: - print ' Obj ', i.Name, ' type ', i.Class, i.Type - print ' Box ', i.Box, ' btype ', i.Boxtype - print ' Label ', i.Label, ' size/style/col/align ', i.Size,i.Style, i.Lcol, i.Alignment - print ' cols ', i.Colors - print ' cback ', i.Callback, i.Argument + print(' Obj ', i.Name, ' type ', i.Class, i.Type) + print(' Box ', i.Box, ' btype ', i.Boxtype) + print(' Label ', i.Label, ' size/style/col/align ', i.Size,i.Style, i.Lcol, i.Alignment) + print(' cols ', i.Colors) + print(' cback ', i.Callback, i.Argument) diff --git a/Lib/plat-irix5/panel.py b/Lib/plat-irix5/panel.py index 1be9146..5a0d87e 100755 --- a/Lib/plat-irix5/panel.py +++ b/Lib/plat-irix5/panel.py @@ -62,18 +62,18 @@ def is_endgroup(list): def show_actuator(prefix, a): for item in a: if not is_list(item): - print prefix, item + print(prefix, item) elif item and item[0] == 'al': - print prefix, 'Subactuator list:' + print(prefix, 'Subactuator list:') for a in item[1:]: show_actuator(prefix + ' ', a) elif len(item) == 2: - print prefix, item[0], '=>', item[1] + print(prefix, item[0], '=>', item[1]) elif len(item) == 3 and item[0] == 'prop': - print prefix, 'Prop', item[1], '=>', - print item[2] + print(prefix, 'Prop', item[1], '=>', end=' ') + print(item[2]) else: - print prefix, '?', item + print(prefix, '?', item) # Neatly display a panel. @@ -81,18 +81,18 @@ def show_actuator(prefix, a): def show_panel(prefix, p): for item in p: if not is_list(item): - print prefix, item + print(prefix, item) elif item and item[0] == 'al': - print prefix, 'Actuator list:' + print(prefix, 'Actuator list:') for a in item[1:]: show_actuator(prefix + ' ', a) elif len(item) == 2: - print prefix, item[0], '=>', item[1] + print(prefix, item[0], '=>', item[1]) elif len(item) == 3 and item[0] == 'prop': - print prefix, 'Prop', item[1], '=>', - print item[2] + print(prefix, 'Prop', item[1], '=>', end=' ') + print(item[2]) else: - print prefix, '?', item + print(prefix, '?', item) # Exception raised by build_actuator or build_panel. @@ -123,18 +123,18 @@ def assign_members(target, attrlist, exclist, prefix): # Strange default set by Panel Editor... ok = 0 else: - print 'unknown value', value, 'for', name + print('unknown value', value, 'for', name) ok = 0 if ok: lhs = 'target.' + prefix + name stmt = lhs + '=' + repr(value) - if debug: print 'exec', stmt + if debug: print('exec', stmt) try: exec(stmt + '\n') except KeyboardInterrupt: # Don't catch this! raise KeyboardInterrupt except: - print 'assign failed:', stmt + print('assign failed:', stmt) # Build a real actuator from an actuator description. @@ -185,7 +185,7 @@ def build_subactuators(panel, super_act, al): act.addsubact(super_act) if name: stmt = 'panel.' + name + ' = act' - if debug: print 'exec', stmt + if debug: print('exec', stmt) exec(stmt + '\n') if is_endgroup(a): panel.endgroup() |