[Stackless] Newbie Questions

Christian Tismer tismer at stackless.com
Sat Oct 1 13:32:05 CEST 2005

Lloyd Weehuizen wrote:

> Thanks Christian, I gave PythonWin a try, nice simple little IDE, it 
> works great until it hits the stackless.run() method and then it stops 
> responding :(

Yeah, that's a different thing. I said it stands Stackless so far,
but you cannot expect any IDE to get debugging right if it
doesn't know about tasklet switching.

> Heres my test application:
> import stackless
> def test():
>     while ( 1 ):
>             print( "test" )
>             stackless.schedule()
> t1 = stackless.tasklet(test)
> t1 = t1()
> stackless.run()

You seem to be quite new to Python, btw.

> I can see "test" appearing in the output window over and over again, but 
> the IDE is completely locked up. If i put a break point in the test() 
> function it never gets hit either.

Be just careful with print. PythonWin uses the Scintilla control,
which is not reentrant. Printing that much as you did is anyway
no good in PythonWin, it seems to freeze because it has todo so
many screen updates and appends to the display control.

Try short programs with not so much output which terminate,
and don't rely on the debugger. Breakpoints will not work
if the stack is not as expected.

As said, it normally doesn't crash with Stackless, but don't
expect that the IDE helps you very much.

ciao - chris
Christian Tismer             :^)   <mailto:tismer at stackless.com>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list