Cool, found an open source flash socket server in python (uses twisted).
tip for compiling: go to folder with mxmlc and:
./mxmlc -l+=/Users/myname/Code/SwfConduit/flex ~/Code/SwfConduit/examples/chat/chat.mxml
I did the chat demo which was cool. Didn’t spend any time looking at the code but that should prove interesting.