Re: [nycbug-talk] twisted python resources

lists at genoverly.net lists
Fri Jan 28 20:10:01 EST 2005


On Fri, 28 Jan 2005 19:27:48 -0500
Pete Wright <pete at finn.nomadlogic.org> 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, 

Pete,

I am no guru, I just like to tinker.  But, I went through a very similar
exercise two summers ago.  You are in for a fantastic ride!  

I wanted to write a private network chat program for day traders to swap
information.  It actually leaned more toward a sqwack box IM app.  I
had a server, two flavors of client (desk mgr, trader), and an admin
client.   It was backed by a MySQL database for authentication, users
preferences, and all the messeages that went flying around. There was a
LOT more to it, but you get the idea.

I looked at twisted but found it to be overly complex; and a whole layer
removed from the programming language.  As my goal was to learn
asynchronous socket programming; specifically python sockets, I went to
the bottom rung and built my way up.  Here's some of the imports from
the server app.

import os
import sys
import asyncore
import asynchat
import socket
import threading
import signal
import marshal

Man, I had a lot of fun with that app... nah.. make that *joy*.  Wait
until you want to add a gui!  I used wxWidgets (formerly wxWindows).  I
developed it in linux but packaged it as an exe with an install program
for windows.

Again, I am no guru, but let me know if I can help.
Michael




More information about the talk mailing list