diff options
author | Christian Heimes <christian@cheimes.de> | 2008-11-28 11:23:26 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-11-28 11:23:26 (GMT) |
commit | aae1b70a83094314043ad65fc098b2aa7137c294 (patch) | |
tree | a78a27e7d4a5090810b337ee2ff6160c98a91c23 /Doc/includes/mp_webserver.py | |
parent | 94e0772989073d207855a787a59f863f79230771 (diff) | |
download | cpython-aae1b70a83094314043ad65fc098b2aa7137c294.zip cpython-aae1b70a83094314043ad65fc098b2aa7137c294.tar.gz cpython-aae1b70a83094314043ad65fc098b2aa7137c294.tar.bz2 |
2to3 run of multiprocessing examples.
mp_benchmarks, mp_newtypes and mp_distribution are still broken but the others are working properly. We should include the examples in our unit test suite ...
Diffstat (limited to 'Doc/includes/mp_webserver.py')
-rw-r--r-- | Doc/includes/mp_webserver.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/includes/mp_webserver.py b/Doc/includes/mp_webserver.py index 4943f5d..b0f001d 100644 --- a/Doc/includes/mp_webserver.py +++ b/Doc/includes/mp_webserver.py @@ -13,8 +13,8 @@ import os import sys from multiprocessing import Process, current_process, freeze_support -from BaseHTTPServer import HTTPServer -from SimpleHTTPServer import SimpleHTTPRequestHandler +from http.server import HTTPServer +from http.server import SimpleHTTPRequestHandler if sys.platform == 'win32': import multiprocessing.reduction # make sockets pickable/inheritable @@ -54,9 +54,9 @@ def test(): ADDRESS = ('localhost', 8000) NUMBER_OF_PROCESSES = 4 - print 'Serving at http://%s:%d using %d worker processes' % \ - (ADDRESS[0], ADDRESS[1], NUMBER_OF_PROCESSES) - print 'To exit press Ctrl-' + ['C', 'Break'][sys.platform=='win32'] + print('Serving at http://%s:%d using %d worker processes' % \ + (ADDRESS[0], ADDRESS[1], NUMBER_OF_PROCESSES)) + print('To exit press Ctrl-' + ['C', 'Break'][sys.platform=='win32']) os.chdir(DIR) runpool(ADDRESS, NUMBER_OF_PROCESSES) |