[Stackless] Stackless/Wing problem - Was "Advice needed on debugging with Twisted/Stackless combo"

Simon Pickles sipickles at hotmail.com
Sat Apr 12 23:26:12 CEST 2008

Wingware Support wrote:
> Simon Pickles wrote:
>> I'm using stackless python and Twisted in WingIDE.
> Are you using Wing 3.0.x or 3.1.x?  Wing 3.1.x fixes tasklet support, 
> though I have not tested your specific example.
Wing 3.1 does indeed provide debugging and breakpoint support for the 
example I gave in the OP.

However, I now have a major problem in my main app whilst using w3.1. 
Inexplicably, the app ends, which should not occur since the app is in 
an infinite loop of stackless.schedule()s.

Now I notice the app works in a terminal window but not in Wing.

Here is a simple example case:

# START --------------------------
import time
import stackless

def Tick():
   while 1:
       print time.ctime()
def DoRx(ch):
   print ch.receive()

if __name__ == "__main__":      
   c = stackless.channel()

# END -----------------------

On my system (Ubuntu Hardy 8.04 LTS), this file outputs:

Sat Apr 12 22:16:03 2008

when run in Wing.

In a terminal, the ctime() keeps counting as expected:

simon at simon-desktop:~/Dev/Hub$ spython HUB.py
Sat Apr 12 22:20:15 2008
Sat Apr 12 22:20:16 2008
Sat Apr 12 22:20:17 2008
Sat Apr 12 22:20:18 2008
Sat Apr 12 22:20:19 2008
Sat Apr 12 22:20:20 2008

[1]+  Stopped                 spython HUB.py
simon at simon-desktop:~/Dev/Hub$

It also works as expected in wing 3.0.4-1, but obviously without the 
required breakpoints.



Linux user #458601 - http://counter.li.org.

More information about the Stackless mailing list