Basic Connection Example : Web Client : Network : Python examples (example source code) Organized by topic

C++
PHP
Python
Python Home »  Network   » [  Web Client  ]  Screenshots 
 



Basic Connection Example



import socket

print "Creating socket...",
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print "done."

print "Connecting to www.java2s.com.",
s.connect(("www.java2s.com"80))
print "done."

           
       
Related examples in the same category
1.  Obtain Web Page
2.  Obtain Web Page With Full Error Handling
3.  Obtain Web Page Information With Simple Error Handling
4.  Obtain Web Page Information With Error Document Handling
5.  Submit GET Data
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.