[nycbug-talk] twisted python resources

pete wright pete
Sun Jan 30 15:57:52 EST 2005

On Jan 30, 2005, at 12:38 PM, Bob Ippolito wrote:

> On Jan 30, 2005, at 14:56, pete wright wrote:
>> On Jan 29, 2005, at 9:24 AM, Bob Ippolito wrote:
>>> On Jan 28, 2005, at 19:27, Pete Wright wrote:
>>>> so i'm looking to write a "simple" messaging client
>>>> for my network in python.  it's more of an exercise to
>>>> get me up to speed on programming in python, but will
>>>> hopefully be usefull for us.  as i know there are several
>>>> python devs here...what would you all suggest as good
>>>> places to look for examples, doc and tutorials.
>>>> i've started checking out using twisted (as it seems
>>>> quite popular and well designed)...so maybe something
>>>> relating to doing dev with twisted would be helpfull
>>> This is just an example of how much Twisted can do for you.  This is 
>>> a trivial chat server for Macromedia Flash's XMLSocket feature.  
>>> Basically what it does is it forwards messages that a client sends 
>>> to every connected user (including the sender).  It's great for 
>>> testing.  For scalability and security purposes, you will of course 
>>> want to use a SSL connection and NOT forward every message to every 
>>> user, but this is good enough to get started with.  The server has 
>>> "no protocol", in that it doesn't understand what's going on beyond 
>>> using '\x00' (the C string terminator, ASCII NULL, zero, whatever 
>>> you want to call it) as a delimiter.  In this scenario, it is up to 
>>> the clients to be "smart" enough to figure out what to do.  If you 
>>> leave the delimiter specification out, it will default to '\r\n' or 
>>> '\n' (I don't recall).. in which case you can telnet into it and it 
>>> will redirect lines to all connected clients.
>> that's wicked bob thanks!  one thing i noticed on friday was that 
>> either twisted is not installed on our systems or it's not installed 
>> in an easily located place.  to get around this I was going to just 
>> install it in $HOME altho it looks like i may have to edit the 
>> install.py to make this happen ok....is there a big gotcha going this 
>> route.  if so i can do the dev. work on boxen off our production 
>> network.
> Twisted doesn't need any extensions to run, so you can just put the 
> "twisted" package (the package containing __init__.py) in the same 
> place as your application (as a sibling of your script).  That's also 
> good because upgrading Twisted on your machine can't possibly break 
> your application.  On my server I have several versions of Twisted for 
> different projects depending on when they were written :)



> -bob
Pete Wright
pete at nomadlogic.org
freenode.net: nomadlogic_

More information about the talk mailing list