[Twisted-Python] Re: Antwort: Re: (no subject)

Uwe C. Schroeder uwe at oss4u.com
Tue May 6 16:40:37 EDT 2003

I'm just trying to extract the relevant code out of my project.
I think the problem is less to use xrc, but more how to make the thing 
interact with Twisted.
To detail what I'm doing:

I create a twisted server listening on two ports. One is the main application 
port handled with auth via pb
The other is a pure "update" port, handled with a normal pb.root object.
My application first connects to the "updater" and checks for updates. If any, 
the files get downloaded and stored. AFTER that I start creating the gui, so 
if the .xrc file changed it will be reflected.
This has two major flaws: 
1) there is a size limitation in twisted for 640k max transfer size.
2) you need to use at least 2 xrc files, one containing the main frame and one 
for the rest. This is because you can't have a wxApp running properly without 
a wxFrame instance - which is created from the first xrc file.
You could install upgrades before even creating an wxApp object, but assuming 
you have a large update with a lot of files the user doesn't see anything 
happening, so probably he starts the application a second time.
What I'll intend to do about that is to restart the application whenever the 
mainframe xrc get's updated. Maybe I'll do this in a wrapper (shell or so) 
catching the exit value of the application.

On Tuesday 06 May 2003 03:22 am, Mike Thompson wrote:
> "Philippe Lafoucrière" <lafou at wanadoo.fr> wrote in message
> news:1052211134.8062.33.camel at biproc...
> > > What my applications do is to fetch a xrc file (wx xml ressource) from
> > > the
> > > server and instanciate the gui locally on the client. That works quite
> > > fine
> > > and btw decouples the gui from the business logic, which is normally
> > > what you
> > > want in a multi tier application.
> >
> > Any documentation on that ? I have the same problems...
> Perhaps Martin will have documentation links but in the meantime I recently
> noticed an open source project (backed by Mitch Kapor) which makes
> extensive use of xrc/python to create a plugin architecture:
>      http://www.osafoundation.org/
> The product is Chandler -- a PIM.  It's source code might give some
> pointers.
> --
> Mike
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Open Source Solutions 4U, LLC	2570 Fleetwood Drive
Phone:  +1 650 872 2425		San Bruno, CA 94066
Cell:   +1 650 302 2405		United States
Fax:    +1 650 872 2417

More information about the Twisted-Python mailing list