Help - Search - Members - Calendar
Full Version: Python 2.4 Zaurus Image Available
OESF Forums > Distros, Development, and Model Specific Forums > Everything Development > Python
kopsis
The first release of my Python 2.4 image for the Zaurus is now available for testing biggrin.gifThe website has fairly complete download instructions. This hasn't had a huge amount of testing so be careful! (backup critical data, yada yada yada). If you do have problems, you can always go back to the previous version (old versions still available at Sourceforge).

Details of what to expect from this version have been covered in this topic. Feel free to report any problems here (but don't expect fixes until next week). Good luck and have a great weekend! smile.gif
jfv
This link asks me for a login and password. What's up with that?

Thanks in advance for creating this package. I'm looking forward to try it.

Felipe
kopsis
QUOTE(jfv @ Jan 14 2005, 08:42 PM)
This link asks me for a login and password. What's up with that?

Just hit "cancel" on the authentication dialog and it should let you in. I havent figured out why it's doing that (it's not supposed to).
kopsis
Scratch that ... cancel doesn't work either. But I think I found and fixed the problem. Give it another try and let me know if you still have problems.
jfv
Sorry, I still can't get through.

Felipe

p.s. Can't you put it in the new ELSI?
kopsis
QUOTE(jfv @ Jan 15 2005, 12:12 PM)
Sorry, I still can't get through.

Felipe

p.s. Can't you put it in the new ELSI?

I just tested it from several different machines and though it still pops up the log-in box, you can "cancel" and it will now let you in.

As for ELSI, the projects there are usually just links to another location (such as my Sourceforge page). That's really a good thing since posting the files alone without the accompanying documentation would be a bad idea. I've tried to make things easy but this is still a good bit more complicated than a simple IPK. Just knowing which image to download (cramfs vs. ext2) requires a bit of an explanation.

Please give the download page one more try. If it still doesn't work I'll have to tackle the problem on Monday.
Greg2
Here's what I get:

This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

Greg
jfv
Hi,
Clicking on the link still doesn't work for me, but I saw the URL and, by manually typing pyqplayer.sourceforge.net, I got to the pyqplayer page from which I could go to the python download page and finally managed to download the package!

I'll try it and let you know if I have any problems.

Thanks

Felipe
Greg2
OK... that works!

Thanks

Greg smile.gif
jfv
OK. Installed and is working. Thanks again.
Felipe
kopsis
QUOTE(jfv @ Jan 15 2005, 04:45 PM)
Clicking on the link still doesn't work for me, but I saw the URL and, by manually typing pyqplayer.sourceforge.net, I got to the pyqplayer page ...

Ah! I should have looked closer at the link smile.gif The link in my original post was indeed hosed. I've edited the post and fixed the link. cool.gif
fpp
Yup, problem gone !

Thanks again for keeping us Zaurus-toting Pythonistas happy Dave !
fp
fpp
Small bug: on the dowload page the link to the ex2 image lacks the ".gz" extension.

Fortunately the instructions page refers to it by that name so the URL can be manually corrected to access the file, but I guess it's not the intended way smile.gif
kopsis
QUOTE(fpp @ Jan 16 2005, 03:47 PM)
Small bug: on the dowload page the link to the ex2 image lacks the ".gz" extension.


Fixed! Thanks for pointing that out smile.gif
fpp
My pleasure Dave smile.gif
slapout
I'm currently using your 2.3 image. To upgrade to 2.4 I know that I need to download the 2.4 image. Do I also need to get the new IPK as well?
kopsis
QUOTE(slapout @ Jan 20 2005, 02:27 PM)
To upgrade to 2.4 I know that I need to download the 2.4 image. Do I also need to get the new IPK as well?
*

Yes. See the "Upgrading" section of this page for more details.
Bertram Wooster
dear kopsis, many thanks for your work!
is there a certain order in which python-exe looks for the img?
i copied the img from my SD to home/zaurus/Documents on my C3000 and ran the python-exe from my SD. the installation worked perfectly, though it mounted the img which was still on SD. actually this is not a problem at the moment, as i usually always have this particular SD in my system, but i'm curious of how to change the default location for the img.
kopsis
QUOTE(Bertram Wooster @ Jan 21 2005, 10:04 AM)
is there a certain order in which python-exe looks for the img?
*


The file /etc/rc.d/init.d/mntpython is a "shell script" that controls locating and mounting the image. You can view it in any text editor and you'll see that starting around line 12 is a big block of if/elif statements that are used to locate the image file. I kept the script brutally simple so you don't have to be a shell scripting guru to understand what it's doing smile.gif By simply changing the order of those if/elif statements, you can control the order in which the script searches for the images.
clofland
Thanks for the 2.4 wrap! It is working great.

I am using the CRAMFS version right now, and it is much faster than the EXT2 2.3 system was.

I don't know if 2.4 is just much faster, or if it is a result of the file system.

Anyway, thanks, it is working great!
Optogeek
Kopsis,

Just installed your Python cramfs image on the main memory of my c860 and there is a small error in the mntpython script. when it searches for the image it looks for /home/zaurus/Documents/${PYTHON}.img but then sets IMAGEDIR="/home/zaurus/" so the mount then fails.

I just changed IMAGEDIR="/home/zaurus/Documents/" and everything works fine. Just need to learn more than print "Hello World" now wink.gif
kopsis
Thanks for pointing that out! I'll be sure to fix it for the next release smile.gif
radioz
Which ROM's will this work with? Would it work with OpenZaurus?
I'm thinking that at least the PyQt library might depend on which rom you have.

p.s. Is there a complete list of all of the Python libraries included in this?

Sounds like great work!

radioz
kopsis
My Python image is designed for ROMs build with gcc 2.95 using the standard Sharp libraries. I'm pretty sure it will not work with OpenZaurus nor pdaXrom since both of those have kernels and libraries built with gcc 3.x using the -msoft-float option. For OZ you may want to check out the Python for ARM-Linux project (though the site appears to be down at the moment).

I don't have a complete list of included modules but my Python image is basically just a complete build of the standard Python 2.4 distribution plus PyQt, PySqlite, and PyMySQL.
sojc
Ok I installed PyQt per instructions and when I run type python it gives me the following errors:

1. Could not find platform independent libraries <prefix>
2. Could not find platform independent libraries <exec_prefix>
3. Could setting $PYTHONHOME to <prefix>[:<exec_prefix>]
4. Process python killed
5. import site' failed; use -v for traceback


Im on the c3000

Im trying to find out, what I need to do to fix this?
freizugheit
kopsis,

Thanks for the excellent job. I have successfully downloaded and installed Python 2.4 on my SL-5600 with original Sharp ROM Version 1.32.

I have tried running widgets.py from PyQt examples and it worked smoothly. However, my own PyQt program encountered low memory problem. Is there any way to solve my memory problem?

By the way, which version of PyQt is bundled and will you be able to disclose the details of subdirectories in the ex2 file.

Once again my sincere appreciation for your contribution.
kopsis
QUOTE(sojc @ Feb 6 2005, 08:50 PM)
Ok I installed PyQt per instructions and when I run type python it gives me the following errors:
*

This sounds like a case of the Python image not getting mounted. Note that the Python executable is installed to internal storage so it's always available ... but it won't actually work unless the filesystem image gets mounted correctly by the /etc/rc.d/init.d/mntpython script.

You can verify this diagnosis by doing a "mount" command (without any parameters) from a root login in the konsole. You should see a line similar to the following:
CODE
/dev/loop1 on /home/QtPalmtop/lib/python2.4 type cramfs (rw)

The loop device may have a different number and the fs type may be "ext2" instead of "cramfs".

If you don't have a line similar to the above, try the following command (from a root login):
CODE
/etc/rc.d/init.d/mntpython start

Post any error messages and we'll work through what might be tripping things up.
kopsis
QUOTE(freizugheit @ Feb 6 2005, 09:08 PM)
However, my own PyQt program encountered low memory problem.  Is there any way to solve my memory problem?
*


The one down side of using Python is that it's a bit memory hungry. The three solutions are to either reduce memory use by other apps, reduce memory use by your Python app, or use a swapfile.

Reducing memory use by other apps may be as simple as turning off "fast load" for the standard Qtopia apps. If you're not familiar with "fast load" settings, a quick forum search will turn up all kinds of info.

You may also find that your Python app is architected such that it's wasting memory. Unfortunately, how to find and fix problems like that is way beyond what can be taught in a forum post. Google can find you examples of Python optimization techniques that may help cut your app's memory requirements. For what it's worth, I've been able to run some pretty healthy Python apps on a lowly SL-5500 by carefully designing the apps to minimize memory use. Using a sqlite database to manage the app's persistant data instead of keeping everything in Python data structures in memory can be a big win.

If you've trimmed the memory footprint for running apps and your Python code as much as practical and you still have problems, you'll need to set up a swapfile. Again, a forum search is the best way to find out how to do that. Keep in mind that swapfiles (due to fairly heavy write activity) can be fairly hard on some SD and CF cards. Choose the location wisely (eg. use an old CF card for you swapfile instead of a brand new expensive 1GB SD card) and disable the swapfile any time you don't need it.

QUOTE(freizugheit @ Feb 6 2005, 09:08 PM)
By the way, which version of PyQt is bundled and will you be able to disclose the details of subdirectories in the ex2 file.

The version of PyQt included is PyQt-x11-gpl-3.13 source downloaded from Riverbank's site and built against Python 2.4 and SIP 4.1.1. I'm not planning on posting a dump of the filesystem, but you can always browse the filesystem yourself. The ext2 (and cramfs) file mounts at /opt/QtPalmtop/lib/python2.4 ... everything under there is in the fs image.
freizugheit
Kopsis,

Thanks for the pointers.
sojc
ok, I copied the python24.ex2 to /home/zaurus/Documents. I typed: /etc/rc.d/init.d/mntpthon start. These are the errors:

/sbin/fsck.ext2 No such file or directory while trying to open /home/zaurus/python4.ex2

the superblock could not be read or does not describe a correct ext2 ext2 filesystem. ......

mount: Could not setup loop device.

But, when i typed: python at the command prompt I got the python command prompt and I ran a simple program. Hello world.

ty
sojc
Optogeek
sojc

You are having the same problem I was. Open up /etc/rc.d/init/mntpython as root and find the line
CODE
elsif [ -f /home/zaurus/Documents/$PYTHON.ex2 ]..........


below it you need to change the IMAGEDIR to /home/zaurus/Documents/

Save the file and then type /etc/rc.d/init.d/mntpython

Hope that helps
kopsis
Ok, I've updated the .ipk with a fixed mntpython script (I would have done it sooner if Sourceforge didn't make updates such an involved process).

If you have Python working, don't waste your time trying to update. I only put the update on line to prevent new users from running into the problem. If you already have the .ipk installed and are having problems with a filesystem image in /home/zaurus/Documents (SL-3000 users?) making the change Optogeek suggested is quicker and easier than trying to reinstall the .ipk and will accomplish exactly the same thing.
sojc
ok guys, thanks for the help. Got it working when I updated the script.



TY
sojc
nilch
I loaded the python image (on SD) and mounts shows it mounted allright.

But when I start a simple application it comes up with error
"QDialog is not defined" - i am using a QDialog at the very beginning.

What would be the problem here ? IIts a very basic Qt class that is included in the Zaurus QTPE definitions.
chroafjd
QUOTE(kopsis @ Jan 14 2005, 02:55 PM)
The first release of my Python 2.4 image for the Zaurus is now available for testing biggrin.gifThe website has fairly complete download instructions. This hasn't had a huge amount of testing so be careful! (backup critical data, yada yada yada). If you do have problems, you can always go back to the previous version (old versions still available at Sourceforge).

Details of what to expect from this version have been covered in this topic. Feel free to report any problems here (but don't expect fixes until next week). Good luck and have a great weekend!  smile.gif
*


Hi Kopsis,

Thanks for the great job.

I didn't have problems installing your Python Image, and making it to work, on my Zaurus C3100. However, I can't get SQLite to work. I have had the ipk installed in Internal Memory as recommended and tried to invoke the application from the console by typing "sqlite". Nothing happens. What am I doing wrong?

Thanks in anticipation of any hints.

Chroafjd

----------------
SL-C3100, Cacko 1.23b ROM, 1GB Transend CF Card, 1GB Kingmax SD Card,
DLink WLAN
freizugheit
I encountered major problem with my SL-5600. Due to lack of backup, I needed to reinstall Python 2.4 after clean installation.

However, on activating python using QKonsole, I was prompted with the following error messages:

- Could not find platform independent libraries <prefix>
- Could not find platform independent libraries <exec_prefix>
- Could setting $PYTHONHOME to <prefix>[:<exec_prefix>]
- Process python killed
- import site' failed; use -v for traceback
- I could not import "qt" to run PyQt codes either


By activating this command:

QUOTE
at/etc/rc.d/init.d/mntpython start


My Python 2.4 backs to normal.
netog
The image works great in my C1000. Just a few questions:

which qt widgets are not included in this pyqt? It seems QDateEdit is not...
Where to find samples of projects with pyqt and mysql connections?

thanks

Neto
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.