Monday, February 27, 2012

Python - Hello World Server

Description: Hello World from Python Server.

#!/usr/bin/env python

# http://kuntoaji.blogspot.com
import socket 

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(("127.0.0.1", 3000))
s.listen(1) # max connection = 1
q,v = s.accept()
q.send("Hello World from Python Server")


Artikel Terkait

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...