PDA

View Full Version : DS Python release



wraggster
April 27th, 2006, 00:24
Richard Tew posted a new release of DS Python (http://www.disinterest.org/NDS/Python24.html) on his site, heres the info:

This is a port of Python 2.4.3 to the Nintendo DS, specifically, a port of the Stackless version of Python. The normal Python functionality is as far as I know, bug free. However, the Stackless scheduler is broken and locks up when started. But this is nothing to worry about, ignoring that this is a modified version of Python and just using it like the normal one will work fine.

There are two versions provided. The FAT version which includes chishm's FAT filesystem support, which allows Python source code to be read from homebrew devices. I, for instance, have a compact flash based Supercard and source code is read from this when imported.

Download & Screenshot Via Comments

rmt38
April 27th, 2006, 07:46
Changes in brief:
- Fixed lots of bugs which would prevent Python from finding modules on homebrew devices.
- Is now, except for the Stackless aspects, bug free and usable to the extent a programming language can be without the DS hardware being exposed to it. So, this means it is in a good place for that to be the next thing worked on.

Detailed changes:
- Identified and fixed a bug in chishm's FAT filesystem code which was breaking the finding of imported modules because of the way the zipimport module works. Fix has been submitted to chishm, but a fixed version of the code is included in the Python patches.
- The use of AddDevice to hook into the newlib file functions had a bug in the hooked seek function, because it implemented the normal seek API instead of the lseek API (it needed to return the current file offset when called, so that the higher level code could know where in the file the underlying FAT code was).
- Corrected the initial memory allocations so that the regions for the heap and the stack were given correctly and in usable amounts. I had no understanding of how this really worked in the initial release. As seen in the screenshot on the website, you can import the 'nds' module and have 'nds.meminfo()' display heap and stack information.
- Moved the FAT code initialisation before the Python initialisation so that the modules could be found while Python was initialising.