portable development -- python for the pda?

Mark Lutz lutz at rmi.net
Tue Dec 2 20:41:43 EST 2003


anton at vredegoor.doge.nl (Anton Vredegoor) wrote in message news:<3fcc9577$0$7676$3a628fcd at reader1.nntp.hccnet.nl>...
> lutz at rmi.net (Mark Lutz) wrote:
> 
> >I'm using Python on a Sharp Zaurus C760 these days,
> >one of the Japan models that you can get converted
> >to English from a number of importers.  It comes
> >with a full VGA (640x480) swivel screen, and a nice
> >keyboard.  The keyboard isn't full size, but it's 
> >much better than the thumbs-key input of most PDAs. 
> >
> >Python runs well on this machine too, with the Sharp 
> >ROM; you can code and run both console and Qtopia
> >GUI applications.  You can also run vim, gcc, mySql,
> >SQLite, Apache, and so on.  With gcc, you can even
> >code and compile Python C extensions right on the PDA.
> >There's a new X11 ROM as well (haven't tried it yet).
> 
> This machine is very interesting for me too. But three things have
> kept me from acquiring it. 
> 
> First it's a bit pricey, probably about 700 euros or so? Prices tend
> to get better so maybe it will become possible in a few months. 

This might be a bit off-topic for c.l.py, and I'm
not a Sharp sales rep, but I'll try to answer 
what I can here.

I have no idea where prices will go on this line.  
There is a cheaper model (C750) if you're willing 
to go with less flash memory and a smaller battery
(of these, the battery is the bigger sacrifice--the
760 typically lasts 8 hours).

Of course, whether these PDAs are too pricey in general
depends on the value of such a machine to you.  They
cost more than an average PDA, but they are not average
PDAs.  They are near laptop replacements.  For me, the 
extra functionality was worth the price increment.  It
runs a full and up-to-date Python, with threads, sockets,
os.popen/fork, and so on, and has a real filesystem and
multitasking.  It also lets me leave a laptop at home
more often than before, and provides a much better PDA 
experience than I had under PalmOS.  But YMMV arbitrarily; 
these are completely subjective remarks.

> Secondly it's not really possible to have a look at it before buying,
> because one has to mail order it, but maybe this will change too in
> the near future. 

There are a few photos and review links on the page I 
mentioned (http://www.rmi.net/~lutz/pic22.html), but
some general googling would be a good idea.  Most mail
order places allow returns (you get 5 days at dynamism),
albeit usually with a restocking fee.  Some people think
that Sharp will start selling these outside Japan 
eventually, but afaik it's still an unknown.

> Third and most important point for me is that I have some application
> I want to use it for, it's my own little pygobo freeware script that
> "nobody" wants to download but which is in my opinion the best
> sgf-file viewer for baduk there is (at least for someone that can
> program Python). However this viewer is written using TKinter and
> there seems to be no such thing as Tkinter on any pda.

The Zaurus runs Qt directly on the frame buffer, so 
there is nothing like X11 in the mix.  Because of that,
the Tk library, and hence Tkinter, won't run out of 
the box, afaik.

You can build GUIs with Qt using the freely available
PyQt package for the Zaurus, but this would require a
recoding of the GUI parts of your program.  Qt is a
fairly typical and feature-rich API; it has a unique
slot/signal coding paradigm, the merits of which you
should judge for yourself (he says, desperately trying
to avoid sparking a GUI war :-).  But it seems like a 
reasonable toolkit if you're willing to translate.

I have no idea if anyone's trying to port the Tk to the 
Zaurus or not; that would be ideal.  Barring that, you 
could try the X11 ROM for the C7x0 series.  In principle,
that might enable Tk and Tkinter (I'd like to try this 
myself, if I get some free time).

Other ideas: the anygui Python module has been reported to
work atop Qt on the Zaurus too.  anygui isn't as feature-rich
as Qt, but it's simpler, and your scripts should be portable
to platforms other than the Zaurus, even if they don't have
a Qt installed.  Because the Zaurus runs a Java VM, you
might have some luck with Jython too (no idea).

> Could you please comment on any of these points and give some
> guesstimate of the time frame in which such a machine will become
> feasible for me. I'd *really* like to review go-files while lying in
> bed or while walking in the woods or whatever and my script is already
> ideally suited for use on such a machine with its full-screen mode and
> rotatable go-board (sorry for the plugging)

I think it's a nice machine, and a great Python platform,
but again, I'm just a satisfied customer.  You might also
consult some of the Zaurus forums on the web.

--Mark Lutz  (http://www.rmi.net/~lutz)




More information about the Python-list mailing list