mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
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:
parent
452bf519a7
commit
be19ed77dd
331 changed files with 2567 additions and 2648 deletions
|
@ -543,9 +543,9 @@ class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
|
|||
|
||||
response = self._marshaled_dispatch(request_text)
|
||||
|
||||
print 'Content-Type: text/xml'
|
||||
print 'Content-Length: %d' % len(response)
|
||||
print
|
||||
print('Content-Type: text/xml')
|
||||
print('Content-Length: %d' % len(response))
|
||||
print()
|
||||
sys.stdout.write(response)
|
||||
|
||||
def handle_get(self):
|
||||
|
@ -565,10 +565,10 @@ class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
|
|||
'message' : message,
|
||||
'explain' : explain
|
||||
}
|
||||
print 'Status: %d %s' % (code, message)
|
||||
print 'Content-Type: text/html'
|
||||
print 'Content-Length: %d' % len(response)
|
||||
print
|
||||
print('Status: %d %s' % (code, message))
|
||||
print('Content-Type: text/html')
|
||||
print('Content-Length: %d' % len(response))
|
||||
print()
|
||||
sys.stdout.write(response)
|
||||
|
||||
def handle_request(self, request_text = None):
|
||||
|
@ -590,7 +590,7 @@ class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
|
|||
self.handle_xmlrpc(request_text)
|
||||
|
||||
if __name__ == '__main__':
|
||||
print 'Running XML-RPC server on port 8000'
|
||||
print('Running XML-RPC server on port 8000')
|
||||
server = SimpleXMLRPCServer(("localhost", 8000))
|
||||
server.register_function(pow)
|
||||
server.register_function(lambda x,y: x+y, 'add')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue