[Stackless] IDE for debugging Stackless

Andrew Francis andrewfr_ice at yahoo.com
Wed Jan 31 21:01:34 CET 2007

Hello David and Colleagues:

--- stackless-request at stackless.com wrote:

> I'm wondering what IDE you're using to debug
> Stackless Python code under Windows?
> I've grown fond of the Wing IDE (www.wingware.com)
> probably because of its similarity to Visual Studio.
>  Unfortunately it cannot currently debug under
> Stackless -- although it sounds like the authors are
> investigating this.

I use Komodo 3.1. Unfortunately I have the same
problems - Komodo crashes. In the past, I believe
Christian Tismer suggested Boa Constructor.
Unfortunately I have not been able to get Boa to work.
Besides I could like to use Komodo.

I had tried the wrapping solution (I don't have the
reference handy). I admit that I don't understand why
this should solve the problem. I had also experimented
with pdb.  I can trace through the Stackless code.
However then the tasklet ends, pdb simply hangs. I
think understanding why pdb hangs is a starting point.

Since lack of a debugger hinders my productivity, and
a debugger not integrated with my IDE even more so,
this is a problem that I am now eager to beat. Given a
few pointers, I would be happy to dedicate the time to
learn more about Python debuggers and the internals of
Stackless Python. 


Wrapping solution

import stackless
import pdb

tasklet = stackless.tasklet
def new_call(self, *args, **kwargs):
    f = self.tempval
    def new_f(old_f, args, kwargs):
        print "wrapper.start", args, kwargs
        old_f(*args, **kwargs)
        print "wrapper.end"
    self.tempval = new_f
    tasklet.setup(self, f, args, kwargs)

tasklet.__call__ = new_call

def test(*args, **kwargs):
    print "test.enter", args, kwargs
    print "test.exit"

tasklet(test)(1,2,3, x=1, y=2, z=3)


import stackless
import pdb

def testTasklet(x):
    print x, "hello"
    print "world"

class Main(object):
    def __init__(self):

    def execute(self):

        while stackless.getruncount() > 1:

main = Main()

Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list