[Stackless] Newbie Questions

Christian Tismer tismer at stackless.com
Thu Sep 29 01:47:09 CEST 2005

Lloyd Weehuizen wrote:

> I've recently downloaded and compiled stackless and after a couple days 
> of play I have a few questions, if anybody could help it would be most 
> appreciated.

here is anybody :-)

> IDEs... I'm assuming stackless isn't compatible with most Python IDEs 
> out there as it has a totally different stack format? Are there any 
> known IDEs that support stackless or do I have to print all my variables? :)

You just need to copy your binary into the right place to try this,
depending on your platform.

I only use IDEs on Windows, and I'm pleased with wxPython and PythonWin.
Tk works too, although I don't use it.

Please note that the stack layout is neither different nor relevant.
If there is incompatibility, then in frame layout, and this only
counts for extension modules which bypass the frame API.
In rare cases, it might be necessary to do a little patch.
Just let me know.

There are anyway other issues:
If you use your IDE an your widgets in a "normal" way, it probably
works. But there are certain assumptions which you can circumvent
with Stackless, and I'm convinced that you can crash every environment
if you try hard enough. The limits about what is allowed and what
not are not yet completely explored.

In general, with Stackless you can break the "lock by position"
implicit feature: Some C extension might call back into Python,
believing that only this code can run and will come back in the
expected order. But with Stackless, you can break this rule
and re-run this code, which might expect to be never run twice
at the same time. This is likely to crash.
You either need to avoid it, or the extension must be made safe
against this.

One issue is for instance the liveness of a mouse event in wxPython,
which apparently is living on the C stack, only. If you jump away
with a tasklet jump, the mouse event will be broken. You need
to build your own Python object before jumping off. This is
a detail I can live with.

> I'm currently using the STABLE version, but saw mentioned that the dev 
> branch supports Psyco. This would be very useful however I also see 
> mentioned that there is a known bug in the dev branch, however its not 
> mentioned what it is, is it a show stopper?

It is a rare bug which showed up in a big project almost a year
ago. I was not able to reproduce it or track it down. We anyway
implemented a much bigger project with it (over a man-year),
and nothing showed up. Maybe I should just switch the trunk
and hope for somebody to step into that?

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