[Twisted-Python] where to begin

Simon Hookway simon at obsidian.com.au
Tue Feb 11 00:09:36 EST 2003

Well, i may be wrong, but then hopefully someone will correct me and
i'll learn too. So here's my 2 cents.

It is rather daunting, i agree. I've built a python/gtk2 app myself
(actually still in the process) using twisted pb. Why, because it
allowed me to call remote methods on the server from an authenticated
client process. Since i already had the methods and a CLI for my app
this was great. I just built a gtk2 interface and made hooks for calling
remote methods, then callbacks to handle the returned data object and
update the gtk2 interface.

The reactor, as i understand it is to hook into the mainloop, since I
needed twisted to hook into the gtk mainloop you have to import the gtk2
reator and install it, otherwise twisteds mainloop reactor takes over
and there's no interaction between twisted and gtk.

Of course, i don't install the gtk2 reactor in my server process, the
normal one is fine.

I chose the pb because it allowed me an easy way to auth clients. On
this issue, i've tried and failed to use SSL for pb auth connections,
can anyone give me quick example of doing a pb auth session using SSL?

I'd be happy to share some of my code if that'll help..



On Tue, 2003-02-11 at 14:59, Rob Brown-Bayliss wrote:
> > Yes, this is a well-known problem.  The docs are improving, but aren't
> > perfect yet.  Hopefully the glossary at
> >     http://twistedmatrix.com/documents/howto/glossary
> > can help you get a one-sentence description of all the wacky terms, so you
> > can figure out what's relevant to you.
> And I still dont get it, am I supposed to use twisted as a base class
> for my app, derive a class for my comunication or what?
> Every thing seems to link on to something else, deffereds, it's own web
> servewr etc, it seems like it's a joke, or if not then certianly
> overkill for sending data over sockets.
> Yet at the same time it seems to say "This is what you need Rob, Twisted
> it is"
> So do where do I start a GUI app, with pygtk and import some object
> based on a factory/reactor setup?  And what is the point of tap's?  why
> not just run the python code as I would any other code?  why would I
> want to change reactors at startup?
> It just seems to defy logic, where as useing pythonx xml-rpc or the
> spread module is simple and obvious, 
Simon Hookway <simon at obsidian.com.au>

More information about the Twisted-Python mailing list