summaryrefslogtreecommitdiffstats
path: root/Demo/pysvr
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-25 13:05:15 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-25 13:05:15 (GMT)
commit2067bfdf253e134a4144d3747300dbfcc7cc6203 (patch)
tree76613f07319d07cc4f0159769131a051504f8c69 /Demo/pysvr
parent3b4b45bfe546b023383d4382af7767359390e264 (diff)
downloadcpython-2067bfdf253e134a4144d3747300dbfcc7cc6203.zip
cpython-2067bfdf253e134a4144d3747300dbfcc7cc6203.tar.gz
cpython-2067bfdf253e134a4144d3747300dbfcc7cc6203.tar.bz2
Rename thread to _thread and dummy_thread to _dummy_thread. Issue #2875.
Diffstat (limited to 'Demo/pysvr')
-rwxr-xr-xDemo/pysvr/pysvr.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Demo/pysvr/pysvr.py b/Demo/pysvr/pysvr.py
index b200fad..3e94dbe 100755
--- a/Demo/pysvr/pysvr.py
+++ b/Demo/pysvr/pysvr.py
@@ -12,7 +12,7 @@ can log in on your machine. Use with caution!
"""
-import sys, os, string, getopt, thread, socket, traceback
+import sys, os, string, getopt, _thread, socket, traceback
PORT = 4000 # Default port
@@ -52,17 +52,17 @@ def main_thread(port):
conn.close()
print("Refusing connection from non-local host", addr[0], ".")
continue
- thread.start_new_thread(service_thread, (conn, addr))
+ _thread.start_new_thread(service_thread, (conn, addr))
del conn, addr
def service_thread(conn, addr):
(caddr, cport) = addr
- print("Thread %s has connection from %s.\n" % (str(thread.get_ident()),
+ print("Thread %s has connection from %s.\n" % (str(_thread.get_ident()),
caddr), end=' ')
stdin = conn.makefile("r")
stdout = conn.makefile("w", 0)
run_interpreter(stdin, stdout)
- print("Thread %s is done.\n" % str(thread.get_ident()), end=' ')
+ print("Thread %s is done.\n" % str(_thread.get_ident()), end=' ')
def run_interpreter(stdin, stdout):
globals = {}