[Idle-dev] CVS: idle PyShell.py,1.73,1.74 rpc.py,1.25,1.26 run.py,1.21,1.22
Kurt B. Kaiser
kbk@users.sourceforge.net
Thu, 05 Jun 2003 16:51:33 -0700
Update of /cvsroot/idlefork/idle
In directory sc8-pr-cvs1:/tmp/cvs-serv17150
Modified Files:
PyShell.py rpc.py run.py
Log Message:
Avoid problem resolving 'localhost'
M PyShell.py
M rpc.py
M run.py
Index: PyShell.py
===================================================================
RCS file: /cvsroot/idlefork/idle/PyShell.py,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -r1.73 -r1.74
*** PyShell.py 2 Jun 2003 01:50:19 -0000 1.73
--- PyShell.py 5 Jun 2003 23:51:28 -0000 1.74
***************
*** 36,39 ****
--- 36,40 ----
IDENTCHARS = string.ascii_letters + string.digits + "_"
+ LOCALHOST = '127.0.0.1'
try:
***************
*** 337,341 ****
def start_subprocess(self):
! addr = ("localhost", self.port)
# Idle starts listening for connection on localhost
for i in range(3):
--- 338,342 ----
def start_subprocess(self):
! addr = (LOCALHOST, self.port)
# Idle starts listening for connection on localhost
for i in range(3):
Index: rpc.py
===================================================================
RCS file: /cvsroot/idlefork/idle/rpc.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** rpc.py 24 May 2003 20:59:15 -0000 1.25
--- rpc.py 5 Jun 2003 23:51:28 -0000 1.26
***************
*** 65,68 ****
--- 65,69 ----
BUFSIZE = 8*1024
+ LOCALHOST = '127.0.0.1'
class RPCServer(SocketServer.TCPServer):
***************
*** 526,530 ****
if self.debugging:
print>>sys.__stderr__, "****** Connection request from ", address
! if address[0] == '127.0.0.1':
SocketIO.__init__(self, working_sock)
else:
--- 527,531 ----
if self.debugging:
print>>sys.__stderr__, "****** Connection request from ", address
! if address[0] == LOCALHOST:
SocketIO.__init__(self, working_sock)
else:
***************
*** 656,660 ****
def test():
! addr=("localhost",8833)
if len(sys.argv) == 2:
if sys.argv[1]=='-server':
--- 657,661 ----
def test():
! addr=(LOCALHOST, 8833)
if len(sys.argv) == 2:
if sys.argv[1]=='-server':
Index: run.py
===================================================================
RCS file: /cvsroot/idlefork/idle/run.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** run.py 2 Jun 2003 01:50:19 -0000 1.21
--- run.py 5 Jun 2003 23:51:29 -0000 1.22
***************
*** 18,21 ****
--- 18,23 ----
import __main__
+ LOCALHOST = '127.0.0.1'
+
# Thread shared globals: Establish a queue between a subthread (which handles
# the socket) and the main thread (which runs user code), plus global
***************
*** 53,57 ****
sockthread = threading.Thread(target=manage_socket,
name='SockThread',
! args=(('localhost', port),))
sockthread.setDaemon(True)
sockthread.start()
--- 55,59 ----
sockthread = threading.Thread(target=manage_socket,
name='SockThread',
! args=((LOCALHOST, port),))
sockthread.setDaemon(True)
sockthread.start()