Stackless Python is an enhanced version of the Python programming language. It allows programmers to reap the benefits of thread-based programming without the performance and complexity problems associated with conventional threads.

Author notes:

About 3 weeks ago, I got a Sony PSP, since only playing games isnt enought for me, I started fiddling around for so called “Homebrew” software for it.

The homebrew community for PSP is quite big and mostly around C coding but surprisingly I found that a guy named Jerome made Python-psp, awesome port of Python 2.4.3 and PSP graphic, sound and network API to Python modules.

Based on that and my bare knowledge of C, I decided to start working on a Stackless Python port for it.

I recently saw the great work from Richard Tew in porting Stackless to Nintendo DS and decided to give a try. Checked out the 2.4.3 PSP port from python-psp repository and merged the Stackless 2.4.4 tag into it.

The first thing to be done, was fixing up some conflicts mostly related to IO and threads. Next Richard pointed me out that the Stackless needs to save and restore stack pointers and this is done in assembly.

Based on trial and error, it took me a day to figure out and have a compiled interpreter.

To finish it all, I ran the stackless unittests and some Stackless applications from the Stackless Examples Project and found that its all working.

I hope other people could try it out and maybe find some bugs, probably I will make the source available and the diff patches too.

The next thing in my roadmap is porting Python and Stackless Python 2.5.1 to PSP, hope it wont be much trouble.

The download is temporarily stored on Stackless Examples project. As soon as I decide to host it or anyone else do, it will be here:

To install just create a folder in your /PSP/GAME150 folder and place the EBOOT.PBP there.
The python folder is the libraries and must be placed on your memory stick root.

For more information check the Python-psp page.

Thanks a lot for Jerome for the amazing work on the Python port and Richard Tew for the Stackless porting!

Any questions contact me directly.