summaryrefslogtreecommitdiffstats
path: root/Doc/includes/mp_webserver.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-11-28 11:23:26 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-11-28 11:23:26 (GMT)
commitaae1b70a83094314043ad65fc098b2aa7137c294 (patch)
treea78a27e7d4a5090810b337ee2ff6160c98a91c23 /Doc/includes/mp_webserver.py
parent94e0772989073d207855a787a59f863f79230771 (diff)
downloadcpython-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.py10
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)