2005-03-02, 07:29
i've decided to try some python as of late by adopting a few code examples out there into a download/content manager that downloads files from a repository and extracts them directly onto the xbox.
you can check it out here: http://www.xr8d.net/dev/
although it works fine, i've run into a couple of minor issues...
first, zip files use cp437 encodings where as i believe the xbox uses latin-1. so when extracting files with foreign (ie: non-english) characters, it would bomb. i figured out how to re-encode the file/directory names from the zip so that appears to work fine now.
the second problem is one that i suspect there is no real good answer for, but i am hoping you xbmc python gurus can steer me in the right direction. the zipfile module in python loads individual files from a zip archive to memory which you then write to disk in binary format. this works perfect for 99% of everything i tried. the only time i came across an issue was when one of the files inside the zip was over 30 megs in size. i am guessing this eats too much memory on the xbox and it just freezes.
the last problem i had was with using agent x to upgrade xbmc itself. certain files will not overwrite themselves. for example the skin texture files and the current running script. i don't know if there is a way to 'unlock' these files for writing or if that is simply impossible.
-prestige
ps: for the record, i hate python! indentation... argh. let's see a perl port to the xbox and then we'll be cooking!