diff options
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) |