# Server program from socket import * # Set the socket parameters host = "localhost" port = 21567 buf = 1024 addr = (host,port) # Create socket and bind to address UDPSock = socket(AF_INET,SOCK_DGRAM) UDPSock.bind(addr) # Receive messages while 1: data,addr = UDPSock.recvfrom(buf) if not data: print "Client has exited!" break else: print "nReceived message '", data,"'" # Close socket UDPSock.close()
# Client program
from socket import *
# Set the socket parameters
host = "localhost"
port = 21567
buf = 1024
addr = (host,port)
# Create socket
UDPSock = socket(AF_INET,SOCK_DGRAM)
def_msg = "===Enter message to send to server===";
print "n",def_msg
# Send messages
while (1):
data = raw_input('>> ')
if not data:
break
else:
if(UDPSock.sendto(data,addr)):
print "Sending message '",data,"'....."
# Close socket
UDPSock.close()
* is Unix
Jacob Kaplan-Moss
October 7, 2009
Examples
Here are some PDF output examples that give an idea of what can be done with dblatex and dbcontext.
Dblatex
* Some examples of the features supported by dblatex:
o DocBook Examples
o MathML Examples
o Sources of the Examples
o Sources + PDF Examples
* The dblatex User Manual is a good example of a default DocBook book output rendering.
* The User Manual in DB2LaTeX style shows the DB2LaTeX style applied to the same document.
* The User Manual in Simple style shows a quite basic latex layout applied to the same document.
* A W3C MathML Test Suite 2.0 Excerpt (bzipped) demonstrates the large MathML 2.0 support included by dblatex.
* The DocBook Definitive Guide (gzipped) compiled with dblatex and the tdg-dblatex.xsl stylesheet.
Dbcontext
* The dblatex User Manual done by dbcontext can show how dbcontext handles the same manual.