Python for iPod
and other tools
Some pictures of the python interactive interpreter on iPod mini:
* For python users: |
python2.4 [ 6.2 MB ]
howto install it This file includes python, tcl and ncurses iPod ports. You need /etc/python.conf, too. |
---|---|
* For python/ipod developers: |
Python 2.4.1 full sources for
iPod [ 13 MB ]
diffs between standard distribution and python4ipod How to cross-compile the Python interpreter |
import sys sys.exit()IMPORTANT: Python files must have extension .py, start with '#!/bin/python' and have exec permissions (chmod +x file.py).
browser.c (modifications) |
---|
... static int is_script_type(char *extension) { return strcmp(extension, ".sh") == 0 || strcmp(extension, ".py") == 0; } ... static int is_binary_type(char *filename) { ... fread(header, sizeof(char), 12, fp); fclose(fp); if (!strncmp(header, "bFLT", 4) || \ !strncmp(header, "#!/bin/sh", 9) || \ !strncmp(header, "#!/bin/python", 13)) return 1; else return 0; } ... } |
Python-ipod benchmarking (done with the lastest kernel on April 1st 2006) |
---|
Pystone(1.1) time for 50000 passes = 171.36 This machine benchmarks at 291.783 pystones/second |
foo:bar:ipodgetty /bin/SashReboot your iPod and after boot, a shell starts, now you can run any app, to use podzilla type: podzilla.