Difference between revisions of "WiiPy"
(→Usage) |
|||
Line 5: | Line 5: | ||
| type = Scripting Language | | type = Scripting Language | ||
| author = tehpola, comex | | author = tehpola, comex | ||
− | | download = [http://serv.qoid.us/wiipy.elf wiipy.elf]<br>[http://www.cs.utexas.edu/~tehpola/PyOGC.cgi PyOGC] | + | | download = [http://serv.qoid.us/wiipy.elf wiipy.elf]<br>[http://www.cs.utexas.edu/~tehpola/PyOGC.cgi PyOGC] (for documentation) |
| peripherals = none | | peripherals = none | ||
}} | }} |
Revision as of 05:27, 7 June 2008
WiiPy | |
General | |
---|---|
Author(s) | tehpola, comex |
Type | Scripting Language |
Links | |
[[wiipy.elf PyOGC (for documentation)|Download]] | |
Peripherals | |
none |
Pronounced "weepy".
PyOGC is an OGC wrapper for Python written in Pyrex (a hybrid Python-C thingy designed for extension developing). The author, tehpola, made a working demo, but the demo itself was made in Pyrex, not real Python. I (comex) hacked Python a little so the interpreter as well would run, and you can run .py files.
Aside from Python being an awesome language, I think Python on Wii might eventually make it much easier for GUI applications to be developed on the Wii, or really anything.
Right now, however, it does not have any GUI, and PyOGC itself is incomplete-- this is really just a demo. The finished version might have have a file selector and maybe a GUI and all that fancy stuff.
Usage
To use, download wiipy.elf, run it by the method of your choice, and put a file called "run.py" on your SD card root containing whatever Python code you want to run.
Besides the modules in PyOGC (the documentation for this is nonexistent, but you can look in the source) you have some basic modules (math, sys), and the standard open() function will open files on the SD card. However, notably, time is presently not available, nor is os and maybe other things.
Bugs
- For some reason, this app seems to fail in weird and wacky ways when launched over the network from HBC. I've only gotten it to work when launched from the SD card. I haven't tested with any additional loaders or the Twilight Hack. YMMV.
- If the script crashes, you will not get a delay before an immediate return to the loader. This is because traceback (which would be required to print the stack trace without exiting python) wants to import os for some reason. This is fixable.
Source
The "source" will eventually be a set of directions for how to patch the Python source distribution to build on the Wii, which will be released when this app is improved. Right now, my directions are extremely ugly: for example, they include copying a failed build command, adding the .a files from libogc to the command line, and running that manually. (Don't ask me why adding the same files in the middle of the command line doesn't work.)
However, if you really want what I have so far, just ask.