Twisted vs Python Sockets

James Mills prologic at shortcircuit.net.au
Thu Sep 18 20:34:42 EDT 2008


On Fri, Sep 19, 2008 at 6:24 AM, Fredrik Lundh <fredrik at pythonware.com> wrote:
> James Matthews wrote:
>
>> I am wondering what are the major points of twisted over regular python
>> sockets. I am looking to write a TCP server and want to know the pros can
>> cons of using one over the other.
>
> Twisted is a communication framework with lots of ready-made components:
>
>   http://twistedmatrix.com/trac/wiki/TwistedAdvantage
>
> Regular sockets are, well, regular sockets.  No more, no less.

There is also one more alternative:

pymills - current version 3.4

It has a different design goal to twisted
and is in no competition with twisted,
however provides:
 * An event framework
 * A component driven architecture
 * A set of components including:
  * TCPServer, TCPClient
  * UDPServer, UDPClient
  * Some protocol components:
   * IRC
   * HTTP
   * SMTP
  * Some other components:
   * Environment
   * Logger
   * Stdin
   * Config

A simple EchoServer is as simple as:
http://hg.shortcircuit.net.au/index.wsgi/pymills/file/4247696a5633/examples/net/echoserer.py

If anyone is interested in trying this library
out, feel free. I recommend you use the
latest development branch available via
Mercurial at:
http://hg.shortcircuit.net.au/pymills/

hg clone http://hg.shortcircuit.net.au/pymills/

If you have any questions, don't hesitate
to ask me. Enjoy :)

cheers
James

-- 
--
-- "Problems are solved by method"



More information about the Python-list mailing list