Update of /cvsroot/pydev/org.python.pydev/PySrc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14290/PySrc
Modified Files:
pycompletionserver.py
Log Message:
Index: pycompletionserver.py
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/PySrc/pycompletionserver.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pycompletionserver.py 27 Aug 2004 17:12:02 -0000 1.1
--- pycompletionserver.py 9 Sep 2004 16:16:20 -0000 1.2
***************
*** 7,12 ****
import time
!
! END_MSG = "@END@"
class T(threading.Thread):
--- 7,11 ----
import time
! from tipper import GenerateTip
class T(threading.Thread):
***************
*** 22,39 ****
s.listen(1)
conn, addr = s.accept()
- data = ''
#print 'Connected by', addr
while 1:
data = conn.recv(1024)
- while not data.endswith(END_MSG):
- data += conn.recv(1024)
-
if not data:
break
! else:
! conn.send('other command')
!
conn.close()
self.ended = True
--- 21,39 ----
s.listen(1)
conn, addr = s.accept()
#print 'Connected by', addr
while 1:
data = conn.recv(1024)
if not data:
break
! r = ''
! for d in GenerateTip(data):
! r += d
! r += '|'
!
! #print 'sending data:' , data
! conn.send(r)
!
conn.close()
self.ended = True
***************
*** 45,46 ****
--- 45,71 ----
while(hasattr(t, 'ended') == False):
time.sleep(1)
+
+
+ # # Echo client program
+ # import socket
+ #
+ # HOST = '127.0.0.1' # The remote host
+ # PORT = 50007 # The same port as used by the server
+ # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ # s.connect((HOST, PORT))
+ # s.send('Hello, world')
+ # data = s.recv(1024)
+ # print 'Received', `data`
+ #
+ #
+ # s.send('Hello, world again ')
+ # data = s.recv(1024)
+ # print 'Received', `data`
+ #
+ # s.send('Hello, world once more')
+ # data = s.recv(1024)
+ # print 'Received', `data`
+ #
+ # s.close()
+ # time.sleep(5)
+
\ No newline at end of file
|