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.)
This commit is contained in:
Guido van Rossum 2007-02-09 05:37:30 +00:00
parent 452bf519a7
commit be19ed77dd
331 changed files with 2567 additions and 2648 deletions

View file

@ -477,19 +477,19 @@ class Thread(_Verbose):
# Lib/traceback.py)
exc_type, exc_value, exc_tb = self.__exc_info()
try:
print>>self.__stderr, (
print((
"Exception in thread " + self.getName() +
" (most likely raised during interpreter shutdown):")
print>>self.__stderr, (
"Traceback (most recent call last):")
" (most likely raised during interpreter shutdown):"), file=self.__stderr)
print((
"Traceback (most recent call last):"), file=self.__stderr)
while exc_tb:
print>>self.__stderr, (
print((
' File "%s", line %s, in %s' %
(exc_tb.tb_frame.f_code.co_filename,
exc_tb.tb_lineno,
exc_tb.tb_frame.f_code.co_name))
exc_tb.tb_frame.f_code.co_name)), file=self.__stderr)
exc_tb = exc_tb.tb_next
print>>self.__stderr, ("%s: %s" % (exc_type, exc_value))
print(("%s: %s" % (exc_type, exc_value)), file=self.__stderr)
# Make sure that exc_tb gets deleted since it is a memory
# hog; deleting everything else is just for thoroughness
finally:
@ -790,7 +790,7 @@ def _test():
def run(self):
while self.count > 0:
item = self.queue.get()
print item
print(item)
self.count = self.count - 1
NP = 3