[Python-checkins] CVS: python/dist/src/Doc/lib libsocket.tex,1.49,1.50

Fred L. Drake python-dev@python.org
Tue, 10 Oct 2000 13:36:32 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv8904/lib

Modified Files:
	libsocket.tex 
Log Message:

Revise the examples not to use the "from socket import *", and adjust
one comment in the example for clarity.


Index: libsocket.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -r1.49 -r1.50
*** libsocket.tex	2000/09/06 02:22:16	1.49
--- libsocket.tex	2000/10/10 20:36:29	1.50
***************
*** 427,434 ****
  \begin{verbatim}
  # Echo server program
! from socket import *
  HOST = ''                 # Symbolic name meaning the local host
! PORT = 50007              # Arbitrary non-privileged server
! s = socket(AF_INET, SOCK_STREAM)
  s.bind((HOST, PORT))
  s.listen(1)
--- 427,435 ----
  \begin{verbatim}
  # Echo server program
! import socket
! 
  HOST = ''                 # Symbolic name meaning the local host
! PORT = 50007              # Arbitrary non-privileged port
! s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  s.bind((HOST, PORT))
  s.listen(1)
***************
*** 444,451 ****
  \begin{verbatim}
  # Echo client program
! from socket import *
  HOST = 'daring.cwi.nl'    # The remote host
  PORT = 50007              # The same port as used by the server
! s = socket(AF_INET, SOCK_STREAM)
  s.connect((HOST, PORT))
  s.send('Hello, world')
--- 445,453 ----
  \begin{verbatim}
  # Echo client program
! import socket
! 
  HOST = 'daring.cwi.nl'    # 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')