Hi Paul:

I have glanced at but never used wxPython. Like Stackless (or Twisted), 
wxPython assumes it is the prime mover of your application. I believe wxPython 
has an Idle event. I suspect the following would work:

1) Put wxPython in its own tasklet.

stackless.tasklet(app.mainLoop)() # kick off the application
stackless.run()                   # stackless scheduler starts

2) Have wxPython OnIdle event callbacks invoke stackless.schedule() to return 
control to the stackless scheduler.

Cheers,
Andrew


--- On Tue, 1/6/09, [email protected] 
<[email protected]> wrote:

> From: [email protected] <[email protected]>
> Subject: Stackless Digest, Vol 60, Issue 4
> To: [email protected]
> Date: Tuesday, January 6, 2009, 3:00 AM
> Send Stackless mailing list submissions to
>       [email protected]
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>       http://www.stackless.com/mailman/listinfo/stackless
> or, via email, send a message with subject or body
> 'help' to
>       [email protected]
> 
> You can reach the person managing the list at
>       [email protected]
> 
> When replying, please edit your Subject line so it is more
> specific
> than "Re: Contents of Stackless digest..."
> 
> 
> Today's Topics:
> 
>    1. stackless & wxpython in one app? (Paul Sijben)
>    2. Re: stackless & wxpython in one app? (Richard
> Tew)
>    3. Re: stackless & wxpython in one app? (Paul
> Sijben)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Mon, 05 Jan 2009 14:35:21 +0100
> From: Paul Sijben <[email protected]>
> Subject: [Stackless] stackless & wxpython in one app?
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=UTF-8
> 
> Until now I have been using stackless on my server and
> wxpython on the
> client of my application.
> 
> However I have the feeling the client would be much more
> nippy if it
> used stackless too.
> 
> Is there a way for both wxpython and stackless to work in
> one application?
> 
> Paul
> 
> -- 
> Paul Sijben                           tel: +31334566488
> Eemvalley Technology BV               fax: +31334557523
> the Netherlands                       http://eemvalley.com    
> -----------------------------------------------------
> EemValley Technology werft python & wxpython 
> programmeurs: http://www.eemvalley.nl/jobs
> 
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Mon, 5 Jan 2009 12:32:22 -0500
> From: "Richard Tew"
> <[email protected]>
> Subject: Re: [Stackless] stackless & wxpython in one
> app?
> To: "Paul Sijben" <[email protected]>
> Cc: [email protected]
> Message-ID:
>       <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> On Mon, Jan 5, 2009 at 8:35 AM, Paul Sijben
> <[email protected]> wrote:
> > Until now I have been using stackless on my server and
> wxpython on the
> > client of my application.
> >
> > However I have the feeling the client would be much
> more nippy if it
> > used stackless too.
> >
> > Is there a way for both wxpython and stackless to work
> in one application?
> 
> There is some discussion of this on the list in the past,
> although I
> am not willing to google it and determine if it is
> worthwhile to use
> as a reference on the subject.
> 
> This link alludes that it is very simple:
> http://aigamedev.com/Blog/2006/09/12/automated-testing-of-user-interfaces-in-wxpython/
> 
> "Integration of Stackless with wxPython. This can be
> done very simply;
> the python script launches stackless.run(), and the main
> tasklet runs
> the wxPython event loop."
> 
> Cheers,
> Richard.
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Tue, 06 Jan 2009 08:42:33 +0100
> From: Paul Sijben <[email protected]>
> Subject: Re: [Stackless] stackless & wxpython in one
> app?
> To: Richard Tew <[email protected]>
> Cc: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="windows-1252"
> 
> I have tried that but found that my stackless threadlets
> are not fired.
> 
> On my server I had ended up putting a while 1: around
> stackless.run() to
> ensure that stackless keeps on running for me.
> This is of course incompatible with starting the wxpython
> main loop.
> 
> Paul
> 
> 
> Richard Tew wrote:
> > On Mon, Jan 5, 2009 at 8:35 AM, Paul Sijben
> <[email protected]> wrote:
> >   
> >> Until now I have been using stackless on my server
> and wxpython on the
> >> client of my application.
> >>
> >> However I have the feeling the client would be
> much more nippy if it
> >> used stackless too.
> >>
> >> Is there a way for both wxpython and stackless to
> work in one application?
> >>     
> >
> > There is some discussion of this on the list in the
> past, although I
> > am not willing to google it and determine if it is
> worthwhile to use
> > as a reference on the subject.
> >
> > This link alludes that it is very simple:
> >
> http://aigamedev.com/Blog/2006/09/12/automated-testing-of-user-interfaces-in-wxpython/
> >
> > "Integration of Stackless with wxPython. This can
> be done very simply;
> > the python script launches stackless.run(), and the
> main tasklet runs
> > the wxPython event loop."
> >
> > Cheers,
> > Richard.
> >   
> 
> -- 
> Paul Sijben                           tel: +31334566488
> Eemvalley Technology BV               fax: +31334557523
> the Netherlands                       http://eemvalley.com    
> -----------------------------------------------------
> EemValley Technology werft python & wxpython 
> programmeurs: http://www.eemvalley.nl/jobs
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.stackless.com/pipermail/stackless/attachments/20090106/b7c92c58/attachment.html>
> 
> ------------------------------
> 
> _______________________________________________
> Stackless mailing list
> [email protected]
> http://www.stackless.com/mailman/listinfo/stackless
> 
> End of Stackless Digest, Vol 60, Issue 4
> ****************************************



      

_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to