Python
  Home arrow Python arrow Page 5 - Sockets in Python
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PYTHON

Sockets in Python
By: Peyton McCullough
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 88
    2004-12-28

    Table of Contents:
  • Sockets in Python
  • The Basics
  • Connecting to the Server
  • Sockets...Simplified
  • Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Route your faxes to your email inbox. Private, secure fax numbers available from CallWave. Choose your fax number.

    Sockets in Python - Summary
    (Page 5 of 5 )

    You have learned that sockets are a valuable tool in the Python scripting language. They enable you to communicate with other computers, clients and servers, and to exchange data. Sockets are used to accomplish many common computer-related tasks, such as browsing Web pages. Though many novices assume that sockets are difficult, the opposite is true. Python also includes a number of libraries built on top of the socket library that allow you to easily write networking applications.

    You now have the knowledge and tools to construct scripts that use sockets. Where you choose to go from here is entirely up to you. However, you may wish to browse through the standard library to find modules to aid development using sockets. Some modules that may help you include the select, asyncore, asynchat, ftplib ( FTP ), poplib ( mail ), imaplib ( mail ), smtplib ( mail ), telnetlib ( telnet ), nnttplib ( news ), SocketServer ( server ), BaseHTTPServer ( HTTP server ), SimpleHTTPServer ( HTTP server ) and CGIHTTPServer ( HTTP server ) modules.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · I´m new to python and very thankful for this fine and concise article on Sockets in...
       · Thanks. I must agree with you on the time-saving part, by the way. With Python,...
       · Hi there.. listen() is about the specifying the size of the queue of connections to...
       · Sorry, that's a bad habit of mine for setting the maximum amount of...
       · what about in a script...you did the same thing everyone does...you show how to do...
       · In that case, you would simply put the same code into a script.
       · I'm getting the following when using your tutorial:>> mySocket.sendto('Wherefore...
       · I think there's an error in the client code for datagrams in this article. The...
       · nice article :)) and ty very much
     

       

    PYTHON ARTICLES

    - SSH with Twisted
    - Mobile Programming in Python using PyS60: UI...
    - Python: Count on It
    - Python Strings: Spinning Yarns
    - Python: More Fun with Strings
    - Python: Stringing You Along
    - Python Operators
    - Bluetooth Programming in Python: Network Pro...
    - Python Sets
    - Python Conditionals, Lists, Dictionaries, an...
    - Python: Input and Variables
    - Introduction to Python Programming
    - Mobile Programming in Python using PyS60: Ge...
    - Bluetooth Programming using Python
    - Finishing the PyMailGUI Client: User Help To...

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway