[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.
Cheers,
Andrew
~
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):
pdb.set_trace()
print "test.enter", args, kwargs
stackless.schedule()
print "test.exit"
tasklet(test)(1,2,3, x=1, y=2, z=3)
stackless.run()
~~
import stackless
import pdb
def testTasklet(x):
pdb.set_trace()
print x, "hello"
stackless.schedule()
print "world"
class Main(object):
def __init__(self):
pass
def execute(self):
stackless.tasklet(testTasklet)("andrew")
stackless.tasklet(testTasklet)("ted")
while stackless.getruncount() > 1:
stackless.schedule()
main = Main()
main.execute()
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless
More information about the Stackless
mailing list