Categories
Apple Programming

Moving Python on your iphone.

Moving your Applications directory to your /private/var/root partition (aka your MEDIA partition) is all well and good, but when you install python on your iphone, it’s installed in both /usr/bin where the main executable resides and the library modules are installed in /usr/lib/Python2.5 .

So they still consume a lot of space on your root partition. In fact, I finally checked my hard disk space on the root partition of the iphone, and there was a pityfull 4.2 Megabytes left over.

So I moved python over to the media partition using the following commands : I first created a python directory on my MEDIA partition, then I moved the python library directory over there and finally I created a symbolic link from there to where it is expected to be.

mkdir /private/var/root/python
mv /usr/lib/Python2.5 /private/var/root/python
ln -s /private/var/root/python/Python2.5 /usr/lib/Python2.5

After that, ‘df -h’ gave the message that 27 Megabyte was free on the root partition !

Excellent 🙂

(Visited 39 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.