1. stackless-dev
  2. Untitled project
  3. stackless

Wiki

Clone wiki

stackless / FAQ

Stackless FAQ

This is a list of Frequently Asked Questions about Stackless Python. Feel free to suggest new entries!

Is Stackless Python compatible with regular Python?

It is possible to use Stackless in place of regular Python. Stackless should be 100% compatible with Python code previously written against regular Python, and also with any extensions previously compiled against regular Python.

There are some exceptions however..

  • Not all extensions are implemented in a friendly manner, and because of this may be unstable or unusable when combined with Stackless Python. This is especially the case with Stackless Versions released before commit 949c518c67c75a1. Since Stackless 2.7.7 most compatibility problems are gone. [*]
  • The greenlet extension module was extracted from Stackless Python, and provides a portion of the functionality that Stackless does. Because of this, using it with Stackless is an odd choice, and will not be supported in any way by the Stackless developers.

What's involved in installing Stackless alongside regular Python?

For Windows

It depends on whether you are using the installers or not.

If you are, then you are limited to having one public/shared installation ("Install for all users") for each version of Python (one installation of 2.7, one installation of 3.3, etc..).

You can download and install a version of regular Python, but you cannot install it a second time. The reason for this, is that an installation for a given version of Python puts a specifically named DLLs under the Windows operating system directory. Stackless Python, in order to behave compatibly, needs to use the same DLL name. If an installation of regular Python 2.7 has its ''python27.dll'' in place, then there is no way for Stackless to have its ''python27.dll'' as a file of exactly the same name.

Personal installations ("Install just for me") are not limited, because they do not install anything into the Windows operating system directory.

A clever trick is to perform a personal installation ("Install just for me") into a temporary directory, then create a zip archive of the directory and finally uninstall the personal installation. Now you can install Stackless simply by unzipping the archive.

Otherwise you always have the option of having regular Python of a given version installed, and compiling Stackless yourself. You can then leave Stackless Python where you have compiled it, and invoke it there when you have a need to do so.

For Unix-like systems

It depends on the unique and special ways in which your particular variant chooses to behave.

By default, when you compile and install Stackless, it will install into ''/usr/local'' with its executable also named python. Your distribution provided regular Python installation, is most likely installed in ''/usr'', and the Stackless Python executable will override its existing executable. The recommended approach is to rename the Stackless Python executable to ''spython'', so that you can explicitly run it, but still have regular Python available as python as it was before you installed Stackless.

Where do I find more tutorials and resources?

Islab.org had a collection of stackless related material. The site doesn't exist any longer, but the Internet Archive Wayback Machine has a copy.

Grant Olson’s tutorial Introduction to Concurrent Programming with Stackless Python is for Stackless Python 2.4 but still worth reading.

Kristján Valur Jónsson not only contributed much to Stackless. He also wrote some great articles: What is Stackless and What became of Stackless.

[*]A prominent example of a previously unusable extension, that is now usable, is PyQT, which is based on an unfriendly package named SIP. Read this thread for further information.

Updated