OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V  < 1 2  
Reply to this topicStart new topic
> Creating Python 2.4 Zaurus Image, What extra modules are a "must"
kopsis
post Jan 11 2005, 02:01 PM
Post #16





Group: Members
Posts: 329
Joined: 1-July 04
Member No.: 3,880



Connections to a remote MySQL database should work just fine as long as you specify things like host, port, user, passwd, etc. as parameters in the connect call (and don't rely on picking them up from [client] section of a my.cnf file). I ran the full suite of dbapi20 tests (about 40 unit tests) and had only three minor failures that shouldn't affect usability.

I've looked at the Twisted networking package and though it looks like really good stuff, it's pretty huge and has some major dependancies (like OpenSSL) that I don't want impose on users that don't need it. At some point I may package it up as an add-on, but it doesn't look like it will make it into the base image. I also looked at PyGames (a Python interface to SDL) but it's also too big and has too many dependancies for the base image.

So, barring any other suggestions, I may be able to package all this good stuff up and have a release by the end of the week. Stay tuned smile.gif
Go to the top of the page
 
+Quote Post
LarsAC
post Jan 12 2005, 02:49 AM
Post #17





Group: Members
Posts: 4
Joined: 31-December 04
Member No.: 6,075



BTW, would this only work on Cacko or other ROMs (e.g. for the 5500/5600) as well ?

Lars
Go to the top of the page
 
+Quote Post
kopsis
post Jan 12 2005, 04:58 AM
Post #18





Group: Members
Posts: 329
Joined: 1-July 04
Member No.: 3,880



I'm testing on a C760 running Cacko 1.22 and a 5500 running the the last official Sharp ROM. So pretty much any Zaurus with a ROM that is reasonably close to the standard Sharp ROM should work just fine. I've even modified the mount scripts to theoretically work with the 3000 (though I have no way to test). It will not be compatible with pdaXrom or OpenZaurus, but I believe they both have their own solutions.
Go to the top of the page
 
+Quote Post
slapout
post Jan 12 2005, 11:16 AM
Post #19





Group: Members
Posts: 50
Joined: 10-November 03
Member No.: 832



I'm using kopsis's Python 2.3 image on a 5600 with the Watapon rom. I've just started working with python, so I haven't tried all the modules. But the basic stuff seems to work and the little stuff I've done with pyqt seems to work.
Go to the top of the page
 
+Quote Post
vernm
post Jan 12 2005, 04:37 PM
Post #20





Group: Members
Posts: 1
Joined: 12-January 05
Member No.: 6,205



I just got my 5600 last week. It is great, but I have a lot to learn re. Linix. I am most interested in Python; I have been using it for about 4 years. I have been reading about your port of 2.4. Sounds fantastic.

I noted that the memory footprint is an issue. Have you looked into the Python feature which allows imports from a ZIP file. This might be a good way to shrink the size. There is probably some time penalty, but I bet it is not too bad.

Right now I am trying to figure out what I need to do to setup Python on my Zaurus. I would like to put it on my SanDisk 512MB SD card. Is there a good how-to guide for setting things up for Linix newbies.

Since I have a lot of python experience, I would be happy to help out anyone who has a Python question.
Go to the top of the page
 
+Quote Post
kopsis
post Jan 13 2005, 04:40 AM
Post #21





Group: Members
Posts: 329
Joined: 1-July 04
Member No.: 3,880



You can read up on my approach to Python on the Z here. That write up is for the previous (2.3) image, but most of it will apply to the new 2.4 image as well. The only big differences are 2.4 (obviously smile.gif ) and that I'll offer a cramfs image in addition to the ext2 version.

A cramfs image, for those not familiar with them, is a "Compressed RAM FileSystem". It's basically a ramdisk image that is compressed and saved to a file. Since it's already compressed, the trick of importing modules from a ZIP file is unnecessary. Using the cramfs image will be a bit slower than the ext2, but the whole thing will need less than 10MiB of space on your SD or CF card.

The ext2 image will remain avialable for those who are willing to trade space for speed and for developers who want to be able to add packages or otherwise customize the image (the ext2 image is read-write, the cramfs is read-only). You'll be able to fit either onto a 512MB SD card and still have over 450MB of space left smile.gif
Go to the top of the page
 
+Quote Post
Ragnorok
post Sep 17 2005, 09:49 AM
Post #22





Group: Members
Posts: 298
Joined: 27-October 03
From: Greenfield, NH
Member No.: 781



QUOTE(Bertram Wooster @ Jan 11 2005, 08:06 PM)
it's definitely worth a try, though i'd be thankful for your "semi-detailed instructions"- i'm not new to computers however to linux and especially unix commands are quite unknown to me.
*

- Just did this and it's pretty simple. Thanks kopsis, for putting this thing together. Beats installing all of that stuff separately!!

- Naturally you must have an ext2 file system available. My SD is ext2; since it never comes out of Hiroshi I don't care if it's not compatible with another device. I mount it from the Z when I need to move data around.
- I just looked at the /etc/rc.d/init.d/mntpython script to see it wanted to mount it to /opt/QtPalmtop/lib/python2.4. Farther down you'll find an fsck.ext2 command, then after that a mount command to mount file system using a loop. Take note of these commands. The Z has two loop devices already, so unless you're using them for something else, you won't have to wory about the lines that create a bunch of loop devices. If both of your loops are busy you'll have to make another one.
- I created a place on the SD to hold the python directory. Since it's going to be linked to /opt/QtPalmtop/lib, I used /usr/mnt.rom/card/QtPalmtop/lib/python2.4. Anywhere will work just fine ... simply create a directory.
- Just 'cause, I ran the fsck to be sure the python24.ex2 wasn't corrupted, which is what it does each time it mounts.
- Then I created a temporary dir to mount it to, since the final "resting" place has to be the /opt...lib dir above. I used /home/zaurus/mnt, but anything writable that's not the lib dir above should work fine.
- Use the noted loop mount command, substituting the location of python24.ex2 for $IMAGEDIR/file and the temporary mount point for $PYTHONDIR.
- cp -R <mnt point>\python2.4 <dest dir>. For my example, <mnt point> is /home/zaurus/mnt and <dest dir> is /usr/mnt.rom/card/QtPalmtop/lib/python2.4, just to be painfully explicit. (grin)
- The odd thing is this actually puts stuff in <dest dir>\mnt. I could have copied it down one directory, but I was feeling lazy, so I just linked to there.
- cd /opt/QtPalmtop/lib
- ln -s <dest dir>\mnt python2.4
- umount <mnt point>
- rmdir <mnt point> (only if you want to ... I created it just to mount this .ex2 so I deleted it when I was done)
- rm <path to>\python24.ex2. You don't need this any longer because it' on your SD card in <dest dir>\mnt now.
- You can delete mntpython, or just uncomment the exit 0 at the beginning, which is what I did. If you don't prevent this from running you'll get errors next reboot.
- Run the Hello World example from the installation instructions. Also, type "help()" and press Enter. If it loads help, you know you're golden ... if there were errors but it still gets a python command prompt, the Hello World will still work but it won't load help.
- Enjoy your new kopsis-provided python 2.4 installation.

- I've had very good results moving binaries and libraries to wherever and linking them back to where they started. I haven't done this with python yet, but I certainly will be. Just move python-exe from /home/QtPalmtop/bin to /mnt/card/QtPalmtop/bin and "ln -s" to "put it back". Nethack is the only thing I've seen that fails with this treatment, so even if you have to install to "Internal", it doesn't have to stay there. I have tons of free space because I don't let stuff live there forever. If it doesn't work ... no biggie ... just remove the link and move it back! This is Linux, not Winbloze, and it simply won't care.

- The entire reason I did this is to get gnome-sudoku to run. I scoured the web fo Sudoku generators and this is the only thing I found. Tons of *solvers*, but no generators/players for the Z at all. Gnome-sudoku is written in python, and kopsis so very conveniently provided this package for the latest version.
- I'm going to play with it today.

- Hope this helps...
Go to the top of the page
 
+Quote Post
rjohnson1969
post May 10 2007, 01:58 PM
Post #23





Group: Members
Posts: 46
Joined: 27-May 04
From: North Texas
Member No.: 3,468



QUOTE(kopsis @ Jan 13 2005, 06:40 AM)
You can read up on my approach to Python on the Z here.

KOPSIS,
This is an ingenious way of packaging python. Until I found your site, I was too intimidated to install it. Now, its on my sl-5500 SD and running fine.

I have a question: Does the loop filesystem mounted from SD throw off the SharpROM System Info application that estimates memory remaining? Mine seems to have gone up by about the size of the read only image... or I have some major cleaning up to do...

Thanks,
-- RJ
Go to the top of the page
 
+Quote Post
hughsieman
post Jun 16 2007, 05:39 AM
Post #24





Group: Members
Posts: 28
Joined: 28-December 06
Member No.: 13,514



Hi

I have installed your python image kopsis and have been using it for the last few weeks to learn python/PyQt so thanks very much for that.

Just one thing though. I would like to set up python/PyQt/Qt on one of my Windows machines and I would like to be able to develop on the Windows machine and then run on the Z and vice versa.

I installed Python obviously, then Qt and then PyQt. Then I needed scintilla which I installed and then I needed sip and it was all getting a bit silly. Needless to say I couldn't get it to work. I was trying to get Idle up and running but failed.

I think I had the wrong versions to match the Z anyway as I was installing PyQt4 and I think it should have been version 3.

Anyway, please would someone let me know what to download and install and how to do it to achieve the above.

Many thanks and apologies for the fairly long post.

Also if this would be best in the Desktop thread then please let me know.
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th September 2014 - 04:06 PM